[libc++] Fix duplicate names in benchmarks (#215676)
A few benchmarks were using names that were reused elsewhere in the test
suite. All benchmarks must have a unique name, otherwise we can't
distinguish them in LNT.
[Flang][Driver] Override -ffast-math floating point contraction with -ffp-contract= (#213574)
This patch allows overriding the floating point contract settings
implied by -ffast-math by explicitly specifying -ffp-contract=. The
final floating point contract mode follows the usual last-flag-wins
behavior. In addition, -fno-fast-math only cancels the effects of
-ffast-math and preserves any explicitly specified -ffp-contract=
setting.
A warning is emitted when an explicit -ffp-contract= option overrides
the floating point contract mode implied by -ffast-math.
This behavior is consistent with Clang.
[CIR] Record target-cpu and target-features on function declarations (#214986)
A function declaration carried no CPU or feature attributes. CIRGen set
them from `setNonAliasAttributes`, which runs only for a definition,
where classic CodeGen sets them from `ConstructAttributeList` for a
declaration too. We now set them properly in `constructAttributeList`
alongside the other non-call-site attributes.
Recording them on a declaration exposes a second bug. When a function is
declared first and defined later with a `target` attribute,
`setNonAliasAttributes` wrote the definition's values over the
declaration's rather than replacing them, so a `tune-cpu` that the
`target` attribute suppresses survived. It now clears the three
attributes before writing, which is safe because
`getCPUAndFeaturesAttributes` resolves the most recent declaration, so
its result supersedes anything an earlier one wrote.
Assisted-by: Cursor / claude-opus-5
lit/reports.py: Make Py3.8-compatible (for #211066) (#215554)
I know py3.8 is slightly old. That said;
- llvm/CMakeLists.txt restricts the bottom version as 3.8
- This is not a functionally-critical change
I won't object further discussions if version upgrade would be required.
[CIR] Avoid folding non-integer constants as integer casts (#214551)
CIRGen may produce undef constants while recovering from NYI builtin
lowering. When such a value feeds an implicit integral cast,
CastOp::fold currently treats the source as an integer constant solely
because it is a cir.constant, then calls getIntValue() and crashes.
Added a check for the constant to see if the payload is actually an
IntAttr before folding the cast. If it is not, return the cast unfolded.
Added a regression test covering an unimplemented __builtin_stdc_* call
whose undef result was implicitly being cast to integer by CastOp::fold.
Part of issue #214443
[orc-rt] SPS serialization: SPSExecutorAddrRange <-> span<T> (#215693)
Allows a memory range to be sent as an SPSExecutorAddrRange by the
controller and received as a span<T> by the executor, so handlers can
take a span directly rather than converting from an ExecutorAddrRange
themselves.
The wire format is identical to the existing ExecutorAddrRange
serialization -- a (Start, End) address pair -- so the two are
interchangeable in either direction.
Note that this transmits the span's bounds, not its contents; that
distinguishes it from the existing SPSSequence<char> / span<const char>
serialization, which copies the bytes.
Since the address pair arrives as untrusted wire data, deserialization
rejects inverted ranges, addresses that don't fit in uintptr_t, and
lengths that aren't a whole number of elements, rather than constructing
an out-of-bounds span.
[RISCV][NFC] Move ZacasABIFix Pass Declaration
This change moves them into their own header, as has been done for the
other NewPM passes.
Assisted-by: AI
[RISCV][NFC] Move RISCVCodeGenPrepare Declarations
This change moves them into their own header, as has been done for the
other NewPM passes.
Assisted-by: AI
[RISCV][NFC] Move ZacasABIFix Pass Declaration
This change moves them into their own header, as has been done for the
other NewPM passes.
Assisted-by: AI
[RISCV][NFC] Move RISCVCodeGenPrepare Declarations
This change moves them into their own header, as has been done for the
other NewPM passes.
Assisted-by: AI
[MC][x86-64] Decide if each individual mergeable constants is small or large (#209881)
Rather than only relying on the code model. Otherwise we can end up with
the IR and MC disagreeing about which ones are small/large.
Don't use MergeableConst*Section in
TargetLoweringObjectFileELF::getSectionForConstant(), decide which
section dynamically. Other binary formats still use those though.
This resolves some relocation overflows from mixed small/medium code
model code.
Followup to #190903.
Assisted-by: Gemini
[clang] Don't mark a field invalid for unparsed in-class member initializer. (#215423)
We delay parsing of in-class member initializers until the end of the
outermost class declaration. It is an error for code to try to use that
initializer before it's parsed. However, sometimes that error can be
suppressed by an SFINAE context. Since we aren't sure a user-visible
error will be emitted, don't mark the field invalid.
Fixes https://github.com/llvm/llvm-project/issues/215166 .