[InferAddressSpaces] Treat addrspacecast constant expressions from flat as roots
The pass uses the pointer operand of an `addrspacecast` instruction as a root,
but it misses the same cast folded into a constant expression unless the
constant is itself in a root position, such as a load or store pointer. So a
round trip from LDS through flat back to LDS is not folded when it is, for
example, a call operand.
This PR treats such casts in any operand as roots, including nested ones. Other
constant expressions only produce another flat pointer.
Fixes LCOMPILER-3204.
This PR was assisted by AI but I reviewed all the changes.
Hexagon: Remove dead kill flag maintenance in HexagonQFPOptimizer
The operands are virtual registers, which can no longer carry kill
flags.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RISCV: Fix ensureDominates crashes on operands without a vreg def (#241034)
ensureDominates used an unchecked getVRegDef on every register
operand. This crashed on physical register uses or undef vregs. Also
fix dropping an incoming undef flag which would fail the verifier.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Revert "[RISCV][clang] Support XSfmm ABI attributes (#206260)" (#241096)
This reverts commit 09dcbfb936c629a1285fb04fff9974456f041804. Revert for
now and investigate why compile time increase.
Attributor: Decide which instructions access memory in the opcode switch
initializeInformationCache already switches over the opcode of every
instruction, and then called mayReadOrWriteMemory out of line for each
one. Decide in the switch instead, where only calls need to check their
memory effects.
Instruction counts (callgrind) with other pending attributor-light
changes applied: attributor-light sqlite3 -0.79%, kimwitu++ k -0.32%,
SPASS cnf -0.31%, consumer-typeset z08 -8.59%; the full attributor
-0.02% to -0.08%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Attributor: Make IRPosition::verify inline without expensive checks (#241087)
IRPosition::verify only checks anything with EXPENSIVE_CHECKS, but
every IRPosition constructor still called it out of line. This
prevented keeping the position in registers plus the cost of the call.
Instruction counts (callgrind) over 68 llvm-test-suite TUs, with other
pending attributor-light changes applied, median:
attributor-light -0.71% (-0.45%), attributor-light-cgscc -0.31%
(-0.38%), attributor -0.35% (-0.45%).
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[lldb] Don't cache symtabs for memory modules w/ corefile (#237050)
In https://github.com/llvm/llvm-project/pull/229305 I added a new
setting, `symbols.enable-lldb-index-cache-memory-modules` which creates
a DataFileCache symtab file for memory-read modules. Reading the symbol
table out of memory is a serious performance issue, and caching those
tables on the debug host is worth doing by default.
This is not the correct tradeoff if we are doing corefile debugging,
where reading memory is cheap. In that case we need to ignore the
`symbols.enable-lldb-index-cache-memory-modules` setting and not create
the symtabs, unless the user has set
`symbols.enable-lldb-index-cache` themselves.
This patchset is a little tricky because the layers where we can make
this judgement (DynamicLoader or Process) is pretty far away from the
place where we create the Symtab, `ObjectFile::GetSymtab` and there is
another scenario I want to override the default for in the future that
is only knowable to the DynamicLoader (if the DynamicLoader believes ALL
[28 lines not shown]
Use maskTrailingOnes() for the largest operand count
There's nothing in <bit> that builds a mask, but maskTrailingOnes() does,
and it's what Bitfield uses for the field's own mask. Unlike a shift or a
rotate, it's also right for a field as wide as an unsigned.
Assisted-by: Claude Opus 5.5
drm/amdkfd: correct vram_available calculation
From Zhen Han
58d07ddaa5f33052a29cb26ca226da281e5f3475 in linux-6.18.y/6.18.63
9131cc85d0dedd8ba4cae60dbe5985d081551f30 in mainline linux