AMDGPU: Remove llvm.amdgcn.addrspacecast.nonnull
The intrinsic is fully replaced by the nonnull flag on addrspacecast,
so remove it.
Old bitcode/IR is autoupgraded, though this is very conservative. This
intrinsic was only inserted by the backend, and hopefully nobody was
directly emitting it.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
AMDGPU: Set the addrspacecast nonnull flag instead of the intrinsic
AMDGPUCodeGenPrepare proved the source of certain flat<->local/private
addrspacecasts non-null and rewrote them to
llvm.amdgcn.addrspacecast.nonnull. Now that the flag is honored in
codegen, set it in place on the existing instruction instead.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[fir][aa] Add opt-in cache for use by fir AliasAnalysis clients
Adds AliasAnalysisRecursiveEffectsCache, an opt-in cache that memoizes
per-operation read/write summaries so that getModRef on an operation with
HasRecursiveMemoryEffects does not re-walk its nested regions on every
query.
This is independent of the getSource() memoization added separately: that
one is keyed on (value, flags) and answers "what memory does this value
refer to", while this one is keyed on the operation and answers "what does
this operation and everything nested in it read and write". LICM enables
both, since it only hoists pure-read ops and so invalidates neither.
[clang][bytecode] Save Record::Field PrimType (#221945)
This does not increase the size of `Record::Field` but lets us avoid
classifying fields all the time.
[lldb] Fix flaky TestConcurrentTwoWatchpointsOneSignal (#221697)
`g_watchme` was declared right next to `g_sigusr1_count`. Hardware
watchpoints round the watched address/size to an alignment boundary, so
a watchpoint on `g_watchme` could also end up covering
`g_sigusr1_count`. When the signal thread's handler touches
`g_sigusr1_count` while the watchpoint threads write `g_watchme`, that
overlap causes a spurious hit and lldb can attribute the stop to the
wrong thread.
See llvm.org/PR35228.
Fix: group the watched field and its padding into a single aligned
struct (`WatchMePadding`), so the compiler is guaranteed to lay out the
data and padding together.
Assisted by Claude.
[CIR] Use the modern enum case classes
The `I32EnumAttrCase` family carries an `Attr` half, and an `IntegerAttr`
predicate with it, that a CIR enum has no use for now that the enums derive
from `EnumInfo`. Upstream says of those forms that they "are not needed when
using the newer `EnumCase` form".
Rename all 198 of them to `I32EnumCase`, `I32BitEnumCaseNone`,
`I32BitEnumCaseBit` and `BitEnumCaseGroup`. The group class drops its width
prefix because the modern spelling takes the width from its cases.
NFC, mechanical.
[VPlan] Add IV steps cost tests for small trip counts and regions (NFC). (#221948)
Add 2 tests covering missing cases: scalar-iv steps cost in single
iteration loops, and cost in replicate regions.
[CIR] Cast alloca for function parameter to the right address space (#220836)
Function parameters are stored into temporary allocas and for
address-space aware targets allocas may yield pointers to address spaces
that are different from default address space or the address space of
the parameter type. Do a cast to avoid mismatch. The address space
mismatch was reproduced using cir.ternary op returning a function
parameter and a local variable. For local variables and return
temporaries we already cast alloca address space to temporary address
space but not for function parameter allocas.
[CIR] Drop the redundant suffix from the inline kind mnemonic (#220892)
inline_kind was the one CIR enum attribute mnemonic still repeating what
its
C++ enum class name says. The attribute now spells
`#cir.inline<always_inline>`. The operation argument keeps the name
inline_kind, since that is the accessor name, so the printed form reads
`inline_kind = #cir.inline<always_inline>`.
The enum's summary also becomes "inline kind" rather than the camelCase
"inlineKind", which is what generated docs show now that
CIR_InlineKindAttr
no longer overrides it.
25 CHECK lines change across four test files. Nine are in an
aarch64-registered-target test, unsupported in an X86-only build, but
the
substitution matches the two CIR tests that do run.
Log a preformatted message from the hardware entitlement script
This commit makes some changes where the script's outcome record was a JSON document whose schema was restated on the reading side, even though the file has exactly one consumer and that consumer deletes it on first boot. It now writes a single preformatted line, only when something actually failed, and middleware logs it verbatim.
Dropping the benign outcomes leaves the unknown-chassis, Mini and ineligible-platform branches doing nothing but returning, and the allowlist check already rejects all three, so they collapse into it.