[MLIR] [Mem2Reg] Fix unused block argument removal logic (#188484)
There was a problem with the way Mem2Reg was removing unused block
arguments, as it was incorrectly assuming the reaching definition was
still available when connecting the successor operands but it may have
been removed as part of the mem2reg process. This approach instead
places successor operands eagerly, and removes them along with the block
argument if unused (similarly to how it was done before the region
support).
This also fixes what I think was a long-standing issue where a block
argument only used by operations that will be deleted would not be
considered unused.
Fixes #188252
Add support for anyAppleOS availability (#181953)
The number of Apple platforms has grown over the years, resulting in
availability annotations becoming increasingly verbose. Now that OS
version names have been unified starting with version 26.0, this patch
introduces a shorthand syntax that applies availability across all Apple
platforms:
```
// Declaration.
void foo __attribute__((availability(anyAppleOS, introduced=26.0)));
// Guard.
if (__builtin_available(anyAppleOS 27.0, *))
```
Implementation:
The `anyAppleOS` platform name is expanded at parse time into implicit
[31 lines not shown]
[lldb][NFC] Remove unused variables (#188385)
Remove unused local variable `s` in
GDBRemoteCommunication::CheckForPacket and unused member
`m_step_thread_idx` in CommandObjectThreadUntil.
[NewPM] Adds a port for AArch64PointerAuth (#188352)
Adds a standard NewPM port for AArch64PointerAuth.
No test updates since all `.mir` files referencing this pass run
combinations of passes, not all of which are ported.
[flang][OpenMP] Rename GetAllDesignators to GetTopLevelDesignators, NFC (#188520)
The function collects all top-level designators. Emphasize the "top
level" part for clarity.
[clang] Pragma for llvm.loop.licm.disable (#188108)
llvm.loop.licm.disable is already availabe at LLVM-IR level to disable
LICM per loop. This PR simply exposes that capability to the developers
at clang level.
[llvm][ADT] Add variable-width tag encoding to PointerUnion (#188167)
PointerUnion stores a fixed-width `ceil(log2(N))`-bit tag in the low
bits of the pointer. This works only when every member type provides at
least that many low bits — if the least-aligned type doesn't,
compilation fails, even though the higher-aligned types may have plenty
of spare bits going to waste.
Introduce a variable-length escape-encoded tag that exploits the extra
low bits of higher-aligned types, analogous to UTF-8: types are grouped
into tiers by NumLowBitsAvailable; each non-final tier reserves one code
as an escape prefix, and the next tier extends the tag into the newly
available bits. This allows PointerUnion to hold more type variants than
a fixed-width tag permits.
The fixed-width path is used when the minimum alignment already provides
enough bits (the common case); the variable-width path activates only
when it doesn't, and requires types to be listed in non-decreasing
NumLowBitsAvailable order.
[4 lines not shown]
[HLSL][SPIR-V] Add vk::ext_builtin_output attribute (#188268)
This attribute is similar to the already implemented ext_builtin_input
attribute.
One important bit is the `static` storage class: HLSL uses static
differently than C/C++. This is a known weirdness:
See https://github.com/microsoft/hlsl-specs/issues/350
In C/C++, when we declare a variable as 'extern', we often expect
another module to declare the symbole. In HLSL, the pipeline will
'declare' the symbol. Hence in this case, we need to emit the global
variable.
Related WG-HLSL:
https://github.com/llvm/wg-hlsl/blob/main/proposals/0031-semantics.md
---------
Co-authored-by: Steven Perron <stevenperron at google.com>
[MLIR] [Python] Fixed a long standing bug in the `PyRegionListIterator` (#188475)
`PyRegionIterator` did not account for start index/step, so this commit
removes it in favor of the sequence iterator provided by CPython.
The previous attempt in #137232 bitrotted, so I decided to open a new
PR.
[AARCH64] Support TPIDR_EL0 and TPIDRRO_EL0 as stack protector sysregs (#188054)
Even though the command line option suggests that arbitrary system
registers may be chosen, the sysreg option for the stack protector guard
currently only permits SP_EL0, as this is what the Linux kernel uses.
While it makes no sense to permit arbitrary system registers here (which
usually have side effects), there is a desire to switch to TPIDR_EL0 or
TPIDRRO_EL0 from the Linux side, both of which are part of the base v8.0
AArch64 ISA, and can hold arbitrary 64-bit values without side effects.
So add TPIDR_EL0 and TPIDRRO_EL0 to the set of accepted arguments for
the -mstack-protected-guard-reg= command line option. For good measure,
add TPIDR_EL1, TPIDR_EL2, FAR_EL1 and FAR_EL2 as well, all of which
could potentially be useful to privileged software such as the Linux
kernel to stash a per-thread pointer to the stack protector guard value.
Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
ipfw: skip tests if required sysctl is not set
Since this is a configuration prerequisite rather than a test failure, use
atf_skip instead.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D56069
[SDAG] Follow target boolean semantics in `PromoteIntOp_VECTOR_FIND_LAST_ACTIVE`
Before handling `VECTOR_FIND_LAST_ACTIVE` expansion, ensure the vector
mask elements get extended accordingly, after the vector mask type is
promoted to its legal type.
Fixes: https://github.com/llvm/llvm-project/issues/187875.