[RISCV] Expand PseudoTAIL with t2 instead of t1 for Zicfilp. (#89014)
PseudoTail should be a software guarded branch in Ziciflp, since its
branch target is known in link time. JALR/C.JR/C.JALR with rs1 as t2 is
termed a software guarded branch. Such branches do not need to land on a
lpad instruction.
ABI Change PR: https://github.com/riscv-non-isa/riscv-asm-manual/pull/93
[clang] Implement provisional wording for CWG2398 regarding packs
This solves some ambuguity introduced in P0522 regarding how
template template parameters are partially ordered, and should reduce
the negative impact of enabling `-frelaxed-template-template-args`
by default.
A template template parameter containing no packs should be more
specialized than one that does.
Given the following example:
```C++
template<class T2> struct A;
template<template<class ...T3s> class TT1, class T4> struct A<TT1<T4>>; #1
template<template<class T5 > class TT2, class T6> struct A<TT2<T6>>; #2
template<class T1> struct B;
template struct A<B<char>>;
```
[18 lines not shown]
[clang] Enable C++17 relaxed template template argument matching by default (#89807)
This patch will finally allow us to mark C++17 support in clang as
complete.
In order to implement this as a DR and avoid breaking reasonable code
that worked before P0522, this patch implements a provisional resolution
for CWG2398: When deducing template template parameters against each other,
and the argument side names a template specialization, instead of just
deducing A, we deduce a synthesized template template parameter based
on A, but with it's parameters using the template specialization's arguments
as defaults.
The driver flag is deprecated with a warning.
Fixes https://github.com/llvm/llvm-project/issues/36505
[BOLT] Register Linux kernel dynamic branch offsets (#90677)
To match profile data to code we need to know branch instruction offsets
within a function. For this reason, we mark branches with the "Offset"
annotation while disassembling the code. However, _dynamic_ branches in
the Linux kernel could be NOPs in disassembled code, and we ignore them
while adding annotations. We need to explicitly add the "Offset"
annotation while creating dynamic branches.
Note that without this change, `getInstructionAtOffset()` would still
return a branch instruction if the offset matched the last instruction
in a basic block (and the profile data was matched correctly). However,
the function failed for cases when the searched instruction was followed
by an unconditional jump. "Offset" annotation solves this case.
[BOLT] Add split function support for the Linux kernel (#90541)
While rewriting the Linux kernel, we try to fit optimized functions into
their original boundaries. When a function becomes larger, we skip it
during the rewrite and end up with less than optimal code layout. To
overcome that issue, add support for --split-function option so that hot
part of the function could be fit into the original space. The cold part
should go to reserved space in the binary.
[clang-tidy] Relax readability-const-return-type (#90560)
From now readability-const-return-type won't provide warnings for
returning const types, where const is not on top level. In such case
const there is a performance issue, but not a readability.
Closes #73270
[clang-tidy] Ignore casts from void to void in bugprone-casting-through-void (#90566)
Improved bugprone-casting-through-void check by ignoring casts where
source is already a void pointer, making middle void pointer casts
bug-free.
Closes #87069
[RISCV] Avoid using x7/t2 for indirect branches which need landing pad. (#68292)
When Zicfilp enabled, this avoids selecting indirect jumps to PseudoBRIND/PseudoCALLIndirect/PseudoTAILIndirect, since they may uses X7 as rs1 and be identified as a software guarded jump. There is an another PR #66762 to use software guarded jump for jumptable branch.
[NFC] Reduce copies created of ConstantRange when getting ConstantRangeAttributes (#90335)
Think that it can be good to reduce the number of copies created when
working with ConstantRangeAttributes.
[InterleavedLoadCombine] Bail out on non-byte-sized vector element type (#90705)
Vectors are always tightly packed, and elements of non-byte-sized
usually do not have a well-defined (byte) offset.
Fixes https://github.com/llvm/llvm-project/issues/90695.
[WebAssembly] Disable reference types in generic CPU (#90792)
#80923 newly enabled multivalue and reference-types in the generic CPU.
But enabling reference-types ended up breaking up Wasm's Chromium CI
(https://chromium-review.googlesource.com/c/emscripten-releases/+/5500231)
because the way the table index is encoded is different from MVP (u32)
vs. reference-types (LEB), which caused different encodings for
`call_indirect`.
And Chromium CI's and Emscripten's minimum required node version is v16,
which does not yet support reference-types, which does not recognize
that table index encoding. reference-types is first supported in node
v17.2.
We knew the current minimum required node for Emscripten (v16) did not
support reference-types, but thought it was fine because unless you
explicitly use `__funcref` or `__externref` things would be fine, and if
you want to use them explicitly, you would have a newer node. But it
turned out it also affected the encoding of `call_indirect`.
[2 lines not shown]