[CIR] Accept a union covered only by a bit-field's declared type
The size of a union is calculated by its largest member. When that
member is a bit-field, the unit storing it can be narrower than the type
it was declared with, and it is the declared type that accounts for the
union's bytes. BitFieldType gains a query for that declared type, and
the x86_64 union rule reads it rather than the stored size, so
`union { int x : 3; }` and `union { int x : 3; char c; }` now both pass
as i32.
A union larger than one eightbyte still needs a member covering it
outright, since the coerce basis skips the entry carrying the
declaration.
Assisted-by: Cursor / claude-opus-5
[OpenMP][offload] Add LIBOMPTARGET_KERNEL_EXE_TIME
If set to 1, prints kernel-specific execution time.
This is a port of the original downstream ROCm patch, extended with the
inclusion of the kernel name in the printed line.
Claude assisted with this patch.
Co-authored-by: Kewen Meng <kewen.meng at amd.com>
Give S3 object ownership its own key
permissions_model carried two questions; the second was AWS's
per-bucket S3 Object Ownership setting. It becomes object_ownership,
defaulting to BUCKET_OWNER_ENFORCED, and the model keeps S3 and
MULTIPROTOCOL alone. A MULTIPROTOCOL row folds to OBJECT_WRITER, as
the S3 service does with it.
S3_BUCKET_OWNER_ENFORCED stays spellable and stores as the pair it
always meant. It is undocumented and goes with its last consumer.
test_boto3_roundtrip no longer expects a POSIX refusal on an S3
bucket: that model ignores the filesystem permissions entirely.
[ConstraintElim] Support IV increments via [u|s]add.with.overflow. (#221771)
Treat [u|s]add.with.overflow like plain add when looking for increment
of an IV. We do not retrieve any wrap flags from the IR in that case, and
leave it to SCEV to determine them as needed.
This did not show any improvements on the workloads in
llvm-opt-benchmark-nightly, but helps to remove runtime checks for Swift
code end-to-end (see newly added PhaseOrdering test).
Alive2 Proof: https://alive2.llvm.org/ce/z/o2vMyw
PR: https://github.com/llvm/llvm-project/pull/221771
[compiler-rt] Add llvm-link deps when building compiler-rt builtins for spirv64 targets (#221906)
https://github.com/llvm/llvm-project/pull/214149 uses llvm-link to
create libclang_rt.builtins.bc from static archive library. It is better
to follow libclc approach to add llvm-link dependency for
builtin-spirv64* in llvm runtime CMakeLists.txt.
Signed-off-by: jinge90 <ge.jin at intel.com>
Fix extension matching and reachable path merging
Metadirective semantic checking relies on ranked selection to decide which
replacements need validation. With match_any and match_none, a selector can
remain applicable even when some construct traits are absent. The existing
matching and path-merging assumptions do not fully account for this, so
ranking can crash or discard a reachable replacement, allowing invalid loop
nests to pass unchecked.
Make applicability, scoring, and reachable-path merging agree on what these
matching extensions can observe. Preserve enough construct context to rank
partially matching selectors and distinguish paths whose nesting changes
the selected replacement. That context must also remain visible inside a
BLOCK associated with a selected directive, so nested metadirectives are
checked against the context in which they can execute.
[SelectionDAG][NFC] Move EmitStackConvert from LegalizeDAG to SelectionDAG (#221357)
I've ran into multiple instances, include #221358 , where I need to
effectively "bitcast" an integer value to a floating point value with
different width (and vice versa). To my best understandings storing into
stack and loading back is the only feasible way. LegalizeDAG already has
this routine, so I thought it might be a good idea to extract it out and
put inside SelectionDAG.
NFC.
[CIR] Check the inherited-constructor call against classic CodeGen
callInheritedCtor had CIR expectations but no OGCG line, so nothing in the
test showed that classic materializes the same temporary and copies into it.
The alloca and the memcpy go on the shared LLVM prefix, since both backends
agree there. The define line and the two calls stay split, because the
parameter attributes and dead_on_return still differ.
Assisted-by: Cursor / claude-opus-5
sysutils/javaservicewrapper: Remove complete ONLY_FOR_ARCHS
ONLY_FOR_ARCHS lists all supported architectures, thus making it redundant.
Reported by: ronald
[CIR] Share the underlying-alloca walk with CIRGen
Two copies of this walk existed and disagreed: Address::getUnderlyingAllocaOp
looked through storage-preserving casts, the calling-convention pass did not.
Address.h is private to CIRGen, so the shared copy lands in the dialect as
cir::getUnderlyingAlloca and both call it.
The pass peels casts now, so the alloca it finds is not always the address the
load used. emitStructFieldArgs builds its cir.get_member from that address
instead, and a byref argument read through an address-space cast now gets the
NYI diagnostic rather than being forwarded into a parameter slot in the default
address space.
plainLoad becomes maybeGetSimpleLoad, after LoadInst::isSimple.
Assisted-by: Cursor / claude-opus-5