[lldb] Add `scripting extension list --instances` (#226043)
There is currently no way to tell which scripted extensions are alive in
a debug session, or which script file a given extension class came from.
This patch addresses that by resolving, for each extension object, the
file of the module that defines its class, and attributing it to the
object's `ScriptedMetadata`. It tracks every successfully created
extension object in a registry owned by the script interpreter, and
lists them with the new `--instances` flag of `scripting extension
list`, grouped by class. Each instance shows a UUID, the address of its
script object and the arguments it was created with:
```
(lldb) scripting extension list --instances
Instantiated scripted extensions:
--------------------------------------------------------------------------------
Class: resolver.Resolver
Extension: ScriptedBreakpointResolver
[23 lines not shown]
[NVPTX] Set default value of nvptx-allow-ftz-atomics to false
This restores the strict FTZ default originally introduced in #200732
and temporarily relaxed in #206154.
Frontends can now explicitly opt in to native FTZ-mismatched atomics on a
per-instruction basis using !atomic.ignore.denormal.mode metadata (#217585,
#217586), which is supported in Clang, MLIR, and XLA. Users who need the
previous behavior globally can still pass -nvptx-allow-ftz-atomics=true.
Update test cases to verify the new default disallow behavior.
[SimplifyLibCalls] Fix ConstantInt construction based on char (#231159)
char has system-dependent signedness. If it is signed, then these
ConstantInt::get() uses would assert because the value is not a valid 8
bit unsigned value.
Cast to unsigned char to make sure we get a valid value on all
platforms.
Fixes https://github.com/llvm/llvm-project/issues/228213.
(cherry picked from commit b3fe8bb231fb43ae186c9ad38766bffb1e7f8e9a)
[AIX]Fix StaticDiagInfoRec size assertion on AIX (#231576)
#[202624](https://github.com/llvm/llvm-project/pull/202624)
(ee0ff209c3aa) added `static_assert(sizeof(StaticDiagInfoRec) == 10)`,
which breaks the build on AIX
On AIX, the canonical layout of bit-fields stores them in four-byte
words regardless of their declared type, which raises the struct's
alignment to four and pads it to twelve bytes. Applying the `pack`
pragma for compilers that employ the AIX canonical layout allows the
struct to fit within the expected ten bytes. This PR applies the same
fix as 844a02e509a4c, just to a different type.
[LoopIdiom] Recognize terminating right-shift bit tests (#231226)
A guarded hand-written `ctz` loop stays scalar in Clang while GCC
removes it. Recognize the terminating right-shift bit-test pattern so
the loop can become `cttz`; keep loops without a termination proof
unchanged.
Fixes #231219.
[test][llvm-ar] Document chmod cleanup in error-opening-permission.test (#231345)
Add a comment explaining why `chmod 700` is chained with both `&&` and
`|| not`, addressing post-commit review on #230361.
Assisted-by: Gemini
[flang][cuda] register type information pages after all units register (#231619)
Registering the pages of the shared type information calls the CUDA
runtime, which initializes the module. With relocatable device code, the
managed variables registered by later units were then never populated.
Register the pages in the initialization constructor, which runs after
the registration constructors of all the units.
[ORC] Remove unused RemoteSymbolLookup and signatures. NFC. (#231732)
RemoteSymbolLookup, its SPS serialization, and the SPSLoadDylibSignature
and SPSLookupSymbolsSignature typedefs in SimpleRemoteEPCUtils.h have no
users. (The only user of RemoteSymbolLookup was the unused
SPSLookupSymbolsSignature.)
[RISCV] Remove GPRAll and DUMMY_REG_PAIR_WITH_X0. (#231680)
This removes the gpr_odd subregister of X0_Pair. X0_Pair is now special
cased where sub_gpr_odd is used. To reduce duplication, I've added a helper
to RISCVRegisterInfo to encapsulate getting the sub registers of a
GPRPair.
I didn't update a few places where we don't expect X0, like callee saved
registers in frame lowering or the destination of a copy.
AI was used to do some refactoring and code review.
[GlobalISel] Remove strict FP opcodes from computeKnownFPClass (#231335)
Fixes https://github.com/llvm/llvm-project/issues/231277
Removed `G_STRICT_FADD`, `G_STRICT_FSUB`, `G_STRICT_FMUL`,
`G_STRICT_FDIV`, `G_STRICT_FLDEXP`, and `G_STRICT_FMA` from
`computeKnownFPClass` since we cannot correctly model their rounding
modes at this time. `G_STRICT_FSQRT` is handled correctly so it stays
(`experimental_constrained_sqrt` is also handled as `sqrt` in
`ValueTracking.cpp`).
I also added additional tests for
`G_STRICT_FSUB`/`G_STRICT_FMUL`/`G_STRICT_FLDEXP` to watch for
rounding-mode dependent deductions in case we re-add those functions in
the future.
I left the `G_STRICT_*` functions in
`GISelValueTracking::isKnownNeverNaN(/*SNaN=*/true)` since they are
correctly handled there.
[2 lines not shown]
[APFloat] Allow lossless conversions to PPCDoubleDouble (#228810)
The conversion from `IEEEdouble` to `PPCDoubleDouble` is lossless, since
the `double` value is just stored in the high-double of the
`PPCDoubleDouble` type. Updated the behavior of
`isLosslesslyConvertibleTo` so that any type that can losslessly convert
to `IEEEdouble` can also losslessly convert to `PPCDoubleDouble`.
AI Disclosure:
I used Claude Opus 5 to help implement the changes and write the tests.
[clang][ssaf] Add clang-ssaf-merge-transformation-report (#231664)
A source transformation writes a SARIF report for each translation unit.
Add a tool that merges the reports of the translation units of a link
unit into one, the way clang-ssaf-src-edit-merge merges their edits.
Each report numbers its rules and artifacts on its own, so the tool
renumbers every result against the merged run before it drops the ones
that are identical, such as a finding in a header that several
translation units include. clang lists a run's artifacts in URI order
but numbers them in the order it first refers to them, so an artifact is
known by its own index. The inputs must come from the same
transformation, and a merged report can be merged again.
---------
Co-authored-by: Kazu Hirata <kazu at google.com>
[mlir][SCF] Avoid linear scans when querying forall buffer aliases (#231187)
Override `getAliasingOpOperands` for `scf.forall` to directly look up
the tied `shared_outs` operand.
The default implementation scans all tensor operands on each query,
making alias lookup quadratic when querying all results. Direct lookup
reduces this to linear overall, improving bufferization time for loops
with many shared outputs.
[mlir][bufferization] Speed up DPS aliasing operand lookup (#231362)
Override `getAliasingOpOperands` for destination-style ops to directly
look up the tied output operand.
The default implementation scans all tensor operands on each query.
Direct lookup avoids repeated scans when querying many results.
[lldb] Fix highlight of digit separators (#224902) (#226363)
### [lldb] Fix syntax highlighting for C++ literal digit separators
The main goal of this PR is to fix a syntax highlighting bug in LLDB
where C++ literal digit separators (e.g., `0b00'00` or `1'000'000`) were
incorrectly parsed and colored as character literals.
Currently, `ClangHighlighter::Highlight` initializes `LangOptions`
manually. While it enables the `CPlusPlus14` version flag, it doesn't
use `LangOptions::setLangDefaults()`. As a result, underlying feature
flags are left in their default `false` state.
**Implementation Notes**
As discussed in the related issue #224902, we opted for explicitly
setting `Opts.AllowLiteralDigitSeparator = true;`. We tried to use
`LangOptions::setLangDefaults()`, but avoided it because, in the
isolated context of the Highlighter, it caused unexpected regressions in
other token tests.
[7 lines not shown]
[Vectorize] Declare command line options in TableGen (#231025)
TailFoldingPolicyTy moves to VectorizeOptions.h. LoopVectorize.h no
longer exports EnableLoopInterleaving and EnableLoopVectorization, which
nothing outside the library reads. LoopVectorizeHints and
LoopVectorizationLegality take the options struct in their constructors.
The -vplan-print-* options and -sbvec-always-verify are AssertsOnly
(#230898), no longer available in LLVM_ENABLE_DUMP builds without
assertions.
-vplan-verify-each defaults to VPlanVerifyEachDefault, true under
EXPENSIVE_CHECKS. -epilogue-vectorization-force-VF (ElementCount parser)
stays cl::opt.
Aided by Opus 5.5
[clang][ssaf] Interpose ld.lld in clang-ssaf-orchestrator-make (#231720)
A clang built with CLANG_DEFAULT_LINKER=lld, or given -fuse-ld=lld, runs
ld.lld for a link rather than ld, so the ld shim stands in for ld.lld
too. ld.lld takes ld's command line.
Assisted-by: Claude