[mlir][SPIR-V] Restrict GroupNonUniform ops to Subgroup scope (#213087)
spirv-val now limits execution scope for GroupNonUniform* ops to
Subgroup, except OpGroupNonUniformRotateKHR which still allows Workgroup
(see https://github.com/KhronosGroup/SPIRV-Tools/pull/6811). Tighten the
ODS trait accordingly and stop lowering GPU non-uniform reductions to a
Workgroup scope op
Follow-up to #212928
[clang][LifetimeSafety] Fix unnamed TimeTraceScope in computePersistentOrigins (#213521)
The TimeTraceScope was constructed as a temporary and destroyed
immediately, so the prepass was reported as taking ~0. It actually
accounts for ~14% of LoanPropagation in some cases.
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[lldb] Fix test_case_insensitivity's register value for canonical/PAC constraints (#213605)
This addresses a test failure introduced in
4f6cf2c2072ccf5780ac30bf69ebf99b788dbd52.
`0x1122334455667788` is a non-canonical address on x86_64 (fails to
write to rsp) and gets its non-addressing bits masked off on read for
pc/lr/sp/fp on Darwin AArch64, so it doesn't round-trip on either. Zero
the top 20 bits to stay clear of both.
[X86] Fix missing CFI after the Swift async context push (#202570)
The Swift async prologue pushes the context slot (pushq %r14 / $0) but
doesn't touch the CFA until the later .cfi_def_cfa_register %rbp. So the
CFA still describes the stack from before the push and stays stale all
the way through the leaq and the subq. If something unwinds in that
window (debugger, profiler, signal) it reads the wrong slot. Normal
execution is fine.
FIX: account for the push with .cfi_adjust_cfa_offset 8, then switch to
an %rbp-relative CFA (.cfi_def_cfa %rbp, 16) right after the leaq and
before the subq, so the rule is correct before rsp moves again.
Adds swift-async-cfi-prologue.ll (directives + .eh_frame rows, plus a
locals case for the subq) and updates swift-async.ll.
[AMDGPU] Add synthetic apertures and use them for barriers
Define what a synthetic aperture is, and adjust the barrier AS
to use this new system. This makes the barrier AS even safer to
use as now we can use all 32 bits of it without ever risking
hitting a valid address of any kind (LDS or outside LDS).
[RFC][AMDGPU] Add BARRIER address space
Add a new BARRIER address space that is used for global variables that are used to represent the barrier IDs in GFX12.5.
These barrier addresses just have values corresponding 1-1 to barrier IDs. They are still implemented on top of LDS, but the offsetting happens during an addrspacecast to generic, not whenever the barrier GV is used.
The motivation for this is to make the relation between LDS and barrier GVs explicit in the compiler. It does add a bit more complexity, but that complexity was already there, just hidden by pretending barrier GVs were actual LDS.
[clang][AMDGPU] Clean-up handling of named barrier type (#207687)
- Allow the type in struct/classes in very limited circumstances. The
goal is to enable creating trivial wrappers around the named barrier
variable, but ensure we can't get into situations where things would get
awkward. Currently this means we only allow the named barrier in
RecordDecls with exactly 1 field, that have no base class, and are not
inherited.
- Use a `amdgpu_barrier` LangAS for this type that currently maps to the
local AS. This allows easy switching to the barrier AS in a future
patch.