[clang][CodeGen] Never collect return value alloca into coroutine frame (#213580)
The coroutine return value must not reside within the coroutine frame;
otherwise, a heap-use-after-free error will occur, as the frame is
destroyed before the return is completed.
In the front end, emit `coro_outside_frame` metadata for the
return-value alloca so that it does not accidentally enter the frame.
Close #49843
[CIR] Derive record padding from the member marks
Now that every record member carries a kind, the record-level `padded`
bool is redundant: a record is padded exactly when some member is marked
pad. Drop the parameter and answer `getPadded()` from the marks.
That also fixes `computeStructDataSize`, which had read the bool as "the
last member is tail padding" and so dropped a real member when padding
sat between two data members. It now drops the trailing run of pad
members instead.
Assisted-by: Cursor / claude-opus-5
[AMDGPU] Prevent GFX11 VALU Hazard Wait merging into terminators (#214935)
Fix an issue where a pending wait would be moved into the block
terminators causing a validation error.
Flush all pending waits and exit optimization loop when reaching first
terminator within a block.
[ORC] Reimplement EPCGenericMemoryAccess on RTBridge proxies (#215160)
Move EPCGenericMemoryAccess off ExecutionSession::callSPSWrapperAsync
and onto rt::Proxy objects. The FuncAddrs struct (13 ExecutorAddrs)
becomes Funcs (13 rt::Proxy members), and each access method collapses
to a single proxy call: the ProxySpec's dispatch now handles argument
serialization and the (Error, Result) -> Expected result plumbing that
was previously open-coded in each method.
Funcs members are protocol-agnostic rt::Proxy values, so a client can
populate a Funcs for a different protocol and pass it to the (public)
constructor. A new static Create(ES) provides the SPS convenience path,
resolving the proxies from the bootstrap JITDylib. The proxy types are
named once as rt::Mem*Proxy aliases in Proxy.h (beside the existing
Call*Proxy aliases) and reused by both the Funcs struct and the
memory-access ProxySpecs added to RTBridge/SPS/ProxySpecs.h.
InProcessEPC and SimpleRemoteEPC now just call
EPCGenericMemoryAccess::Create.
[4 lines not shown]
[LoongArch][LASX] Fix fptosi/fptoui from <4 x float> to <4 x i64> (#214621)
These were lowered through a 128-bit f32 to i32/u32 conversion followed
by a sign/zero extension, which silently clamps any finite input that
does not fit in i32/u32 instead of producing the correct 64-bit integer.
Convert directly with xvftintrzl.l.s for the signed case. For the
unsigned case there is no f32 -> u64 lane conversion in LASX, so widen
to f64 first (which is exact) and convert with xvftintrz.lu.d. Both
forms use xvpermi.d to move the inputs into the low 64 bits of each
128-bit lane, as required by these lane-wise conversions.
Built and verified on Arch Linux for Loong64:
https://github.com/lcpu-club/loongarch-packages/pull/974. Both the LLVM
side and the Highway test suite that discovered the bug have passed
verification.
Assisted by Kimi K3 AI agent.
Fixes https://github.com/llvm/llvm-project/issues/214605
[SandboxVec][Legality] Fix a warning when build with GCC (NFC) (#214907)
Remove `maybe_unused` attribute from ResultReason member, beacuse it
used in `getReason` method. This PR fixes:
llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h:186:33:
error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
186 | [[maybe_unused]] ResultReason Reason;
| ^~~~~~
[ORC] Construct EPCGenericMemoryAccess from ExecutionSession. (#215097)
Construct EPCGenericMemoryAccess objects from ExecutionSessions, rather
than ExecutorProcessControl objects. This is a step towards migrating
EPCGenericMemoryAccess off of raw callSPSWrapper* calls and on to the
new Proxy objects (d99bd3ed157).
[PowerPC][AIX] Reject .weak_definition like ELF (#156072)
weak_definition is a Mach-O-specific directive and is not supported on
XCOFF. Previously it crashed the XCOFF streamer via report_fatal_error
in emitSymbolAttribute. Return false for MCSA_WeakDefinition like
MCELFStreamer does, so the parser rejects it with the same diagnostic as
ELF.
Revert "[libc] Add realpath to linux entrypoints" (#215156)
Reverts llvm/llvm-project#212925, the tests assume that `/tmp` is a
real, valid directory on the system, which is not true for all
buildbots. `libc-riscv32-qemu-yocto-fullbuild-dbg` in particular seems
to have a symlink or similar from `/tmp` to `/var/volatile/tmp`. See
https://github.com/llvm/llvm-project/pull/212925#issuecomment-5234167255.
[CIR] Mark record members as data, pad, or empty in CIRGen
The per-member marks landed with no producer, so every record still reads as
though all of its members held data. A record type still can't say whether it
carries anything for argument passing. The x86_64 classifier has to know that
before it can drop an empty class from a signature.
CIRGen fills the marks in now. Every member goes through one `addField` that
takes its kind, so a new push site can't quietly inherit a default.
A field's mark comes from `isEmptyFieldForABI`, ported from `isEmptyField` in
`ABIInfoImpl.cpp`. Taking the ABI predicate rather than the layout one is
what gets C right. Given `struct E {}`, a struct holding one `E` is empty for
the ABI in C but not in C++.
An assert on every record checks the marks against `isEmptyRecordForABI`, so
the existing `-fclangir` tests exercise them.
One case is now NYI. A `[[no_unique_address]]` field that
[9 lines not shown]
[VPlan] Don't classify irregular element types as contiguous. (#215121)
Before classifying an access as continuous, check if it has an irregular
type. If so, do not widen incorrectly. This matches the logic of the
inner loop code path.
[BFI] Extract computeMassInIrreducibleLoop. NFC (#215137)
This is a load-bearing irreducible loop extension of the Wu-larus
algorithm.
Give it its own function.