Revert "Search for @_thisIsNotAPipe vs _thisIsNotAPipe" (#194929)
Reverts llvm/llvm-project#192132, which broke the `Clang ::
CodeGen/2008-07-31-asm-labels.c` test on mac.
[LifetimeSafety] Generalize invalidating member function detection (#194907)
This PR adds support for invalidating references after reassigning a
`unique_ptr` or calling its `reset` member function.
Previously, invalidation handling was limited to container-like types.
This PR generalizes the helper for detecting invalidating member calls
and adds `unique_ptr`'s `reset` member function as an invalidating one.
Since `unique_ptr` is now handled by this helper, reassignment through
`operator=` is also treated as invalidating.
Fixes #184630
[CIR] Add some missing NYIs for WeakRefAttr/AliasAttr (#194913)
I found these while poking through something else, we should make sure
these don't get lost, particularly as alias has some significant
functionality.
[SandboxVec][SeedCollector] Change vector bit width calculation (#194090)
On GPUs `TTI::getRegisterBitWidth(TargetTransformInfo::RGK_FixedWidthVector()` returns the element bit width, not the whole vector size as it does on the CPU. So this patch changes this to a call to `getLoadStoreVecRegBitWidth()`, which depends on the address space, so it also moves the calculation per seed.
This patch also adds an AMDGPU lit test directory with a simple test.
[WebAssembly] Remove exception deferring in CFGSort (NFC) (#194905)
This logic was added in
https://github.com/llvm/llvm-project/commit/ea8c6375e3330f181105106b3adb84ff9fa76a7c
(and extended to support multiple srcs in
https://github.com/llvm/llvm-project/commit/aa097ef8d474c925e4fbe0efcaad253266c2fd6f).
But as in the case of #191495, we don't need this logic anymore after
#130374. The reason is the same as #130374, but in this PR's context, in
the deleted comments,
> there can be cases in which, for example:
> EHPad A's unwind destination (where the exception lands when it is not
caught by EHPad A) is EHPad B, so EHPad B does not belong to the
exception dominated by EHPad A. But EHPad B is dominated by EHPad A, so
EHPad B can be sorted within EHPad A's exception.
This can't happen anymore, because if an invoke BB throws, and EHPad A
is the first unwind destination, and EHPad B is the next unwind
[6 lines not shown]
[Clang] allow GNU attrs before bit-field width in member declarators (#185322)
Fixes #184954
---
This PR fixes the parsing of member bit-field declarators by allowing
GNU attributes between the declarator and the bit-field width.
```cpp
struct S {
int x __attribute__((packed)) : 4;
};
```
[clang][deps] Value-compare buffers in the in-process module cache (#194888)
The `MemoryBufferRef::operator==()` function performs pointer comparison
instead of value comparison. This means that the assertion in
`InProcessModuleCache` always fires if there's a race between two
producers of a PCM. This PR makes sure to value-compare the contained
`StringRef` buffers.
Revert "[CodeGen] Temporary disable the unreachable" (#194720)
This reverts commit 7dc644fc463a8f42f54d63a99c3a4579df2c3859.
This code path is only used in implementations of
`emitZeroCallUsedRegs()`, it is not required for all platforms that use
stack protectors.
[Offload] Clean up and split Shared/Utils.h (#194876)
Summary:
This is used in the GPU portion of the build, but really shouldn't be.
Most of these helpers were only used by the GPU portion, which has much
nicer builtins available in new clang. Using these in the main offload
build is broken on Windows and not available on older compilers, so we
split. Also means one less header we share.
The alignment helpers are trivially replaced by an LLVM utility, the
only thing that remains are the pointer arithmetic functions. There's no
conveient place to put these so I just let them stay.
[lldb] Add a @skipIfNoSignals decorator for Windows and Wasm (#194760)
Add a new @skipIfNoSignals test decorator that skips tests on platforms
that lack signal support (Windows & WASI).
[clang][Fuchsia] Add test for Fuchsia-specific predefines (#194780)
One of these is tested indirectly via the driver test for
plumbing the `-ffuchsia-api-level=...` switch. But there is no
proper cc1 test for the predefines being defined per se.
[flang][FIR][Mem2Reg] Do not emit potentially wrong debug info (#194837)
When mem2reg replaces values, it can potentially replace a value that is
stored before a fir.declare comes in scope, when the fir.declare was
inlined from another routine. When we emit a declare_value op for such a
variable, it can potentially break dominance with regards to the
fir.dummy_scope op.
Do not emit fir.declare_value op in such cases to prevent compiler
crashes.
[flang][HLFIR] Fix crash in WHERE with exactly_once inside elemental (#194443)
Fix a segfault in LowerHLFIROrderedAssignments when compiling a WHERE
statement whose mask contains an array constructor with an implied-do
loop (e.g. WHERE([(f(J), J=1,N)]) ...). The hlfir.exactly_once op inside
the hlfir.elemental has live-in values that are block arguments from the
enclosing elemental, which canonicalizeExactlyOnceInsideWhere cannot
pull into the exactly_once region.
The fix has two parts:
1. In canonicalizeExactlyOnceInsideWhere, skip exactly_once ops nested
inside hlfir.elemental and skip block argument live-ins, since these
cannot be relocated.
2. In both overloads of inlineElementalOp, handle hlfir.exactly_once by
inlining its body and cleanup operations instead of cloning the op
verbatim (which left an illegal op after lowering).
[6 lines not shown]
[lldb] Handle ConstantExpr constants in InjectPointerSigningFixupCode (#194476)
Currently, the injection code assumes we encounter ConstantAggregate
constants and emits a GEP to access the fields/members. However, it's
possible for a CPA to be an operand of a ConstantExpr (e.g. a bitcast).
Emitting a GEP in that scenario doesn't make sense. This should instead
be handled by keeping track of the path to the CPA (which operands need
to be followed from the top-level ConstantExpr).
After this change, most arm64e tests that crash LLDB either pass or fail
with some other issue. The main exception is TestWeakSymbols.py which
needs more work.
[MLIR][XeGPU] Clean up stale convert_layout on single-element vector in peephole (#194043)
Extend MultiRed2dOpPattern in xegpu-optimize-peephole to also erase
consumer xegpu.convert_layout ops when a 2D vector.multi_reduction
produces a single-element vector (e.g. vector<1xf32>)
[WebAssembly][GlobalISel] Remove unecessary `-verify-machineinstrs` from tests (NFC) (#194799)
Removes all uses of `-verify-machineinstrs` from the Wasm GISel tests.
This only impacts `*.ll` in practice, as `-verify-machineinstrs` appears
to be implicitly enabled when processing `.mir` files.
[lldb] Add skipIfWasm decorator and skip unsupported WebAssembly tests (#194761)
Add a new `skipIfWasm` test decorator that skips tests on the "wasip1"
and "wasi" platforms, and apply it to the test classes that rely on
expression evaluation or lldb-server, neither of which is available when
debugging WebAssembly targets.
[lldb] Decorate tests that use shared libraries (#193118)
`wasip1` does not support shared libraries in the traditional POSIX
sense. It was designed primarily as a monolithic system interface for
standalone modules where everything is statically linked. `wasip2`
introduced a "component model" where components achieve the goals of
shared libraries.