[MC] Move MCTargetOptions pointer from MCContext to MCAsmInfo (#180464)
Except MC-internal `MCAsmInfo()` uses, MCAsmInfo is always constructed
with `const MCTargetOptions &` via `TargetRegistry::createMCAsmInfo`
(https://reviews.llvm.org/D41349). Store the pointer in MCAsmInfo and
change `MCContext::getTargetOptions()` to retrieve it from there,
removing the `MCTargetOptions const *TargetOptions` member from
MCContext.
MCContext's constructor still accepts an MCTargetOptions parameter
for now but is often omitted by call sites.
A subsequent change will remove this parameter and update all callers.
[clang][ssaf] Add JSONFormat support for WPASuite (#187403)
This patch adds `JSONFormat` serialization support for `WPASuite`.
- Adds `readWPASuite` / `writeWPASuite` to the `SerializationFormat`
abstract interface and implements them in `JSONFormat`.
- Introduces `AnalysisResultRegistryGenerator`, a per-format plugin
registry template in `SerializationFormat`, allowing analysis authors to
register (de)serializers for their `AnalysisResult` subtypes with a
single static declaration.
- Extends `PrivateFieldNames.def` with `WPASuite::Data` and
`WPASuite::IdTable`, and adds a `makeWPASuite()` factory to
`SerializationFormat`, so deserialization code can construct a
`WPASuite` incrementally through the same access-controlled pattern
used for all other SSAF data structures.
[Clang][HIP] Deprecate __hip_atomic_* builtins (#189897)
Emit deprecation warnings for all __hip_atomic_* builtins,
pointing users to their __scoped_atomic_* equivalents.
The warning is ignored by default, and can be enabled with
-Whip-deprecated-builtins. It will be turned on by default eventually
after we have cleaned up all ROCm/HIP headers and put a deprecation
schedule in place.
Also provide a fixit when the scope is a compile-time constant and there
is a direct mapping from the HIP builtin to a Clang builtin. The
compare_exchange builtins differ in how they accept the desired value,
so only a warning (without a fixit) is emitted for those.
This makes #185408 almost redundant for HIP, since the HIP scopes
themselves will disappear once the `__hip_*` builtins are gone. OpenCL
is different because the language itself specifies an enum. A simpler
version of #185408 can be used to emit a warning when Sema recognizes
[2 lines not shown]
[SPIR-V] Fix sub-byte argument type mismatch in call lowering (#189893)
Remove the `MRI->setType()` call in lowerFormalArguments that was
overriding the vreg LLT with the SPIR-V type's LLT, causing a type
mismatch when sub-byte integer arguments (e.g. i2, i4) were preliminary
widened to i8
related to https://github.com/llvm/llvm-project/issues/188703
[AMDGPU] Fix duplicate s_wait_asynccnt on gfx12-plus (#190777)
S_WAIT_ASYNCCNT was missing from counterTypeForInstr(), so isWaitInstr()
did not recognize it as a wait instruction. On the fixpoint algorithm's
second pass over a loop body, the already-inserted S_WAIT_ASYNCCNT was
treated as a normal instruction, causing WAIT_ASYNCMARK to be
re-processed and a duplicate S_WAIT_ASYNCCNT to be emitted.
Assisted-By: Claude Opus 4.6
[test] Make MCTargetOptions a class member in DwarfLineTableHeaders (#190904)
Similar to commit 6f0b0ecaba1ba311717f86d8e4d8c6b2b4c4cd4b
createMCAsmInfo will store a pointer to the MCTargetOptions argument in
MCAsmInfo. When MCTargetOptions was a local variable in the constructor,
the pointer dangled after the constructor returned.
[clang-tidy][NFC] Don't store a redundant copy of `HeaderFileExtensions` in every check (#190302)
#80333 removed local `HeaderFileExtensions` options; now there's just
the global option, and its value lives in the `ClangTidyContext`. But
every check still stores its own copy of it, a vestige of the old design
which this change fixes.
[DA] Move no-wrap flag check into checkSubscript (#190770)
Recent patches added no-wrap flag checks to each dependence test (except
for the Banerjee MIV test) to make them sound. These fixes have been
applied one by one to ensure that each dependence test was correctly
updated and the defects were properly addressed. However, ideally, these
functions should not be called at all when the required no-wrap flags
are not set. Specifically, `classifyPair` should tag pairs as
`NonLinear` when either addrec doesn't have the no-wrap flag, which
means that the addrec is as literal non-linear.
This patch moves the existing no-wrap flag checks in the each dependence
test to `checkSubscript`, which is called by `classifyPair`. With this
change, if the addrec doesn't have the no-wrap flag, the pair will be
classified as `NonLinear` and the dependence test will not be invoked at
all. I believe this change makes the code cleaner and consistent with
the meaning of `NonLinear` classification.
Note that this patch doesn't take care of the behavioral change caused
by the Benerjee MIV test, as the test is still not sound and there are
no plans to fix it in the near future.