[DenseMap] Replace tombstone deletion with TAOCP 6.4 Algorithm R (#199615)
DenseMap uses quadratic probing with lazy deletion: an erased entry
becomes a tombstone, a third bucket state alongside empty and live that
every find/insert must inspect.
Switch to linear probing with backward-shift deletion (Knuth TAOCP 6.4
Algorithm R), similar to the SmallPtrSet change #197637. This removes
the tombstone state entirely.
In exchange, erase now relocates the following live entries to close the
hole, so it invalidates iterators and references other than the erased
one. For callers that cache pointers into the bucket array,
erase(Key, OnMoved) and erase(iterator, OnMoved) fire a callback once
per
shifted bucket, so fix-ups cost O(cluster) rather than O(NumEntries).
ValueHandleBase::RemoveFromUseList uses this to refresh each moved
handle's PrevPtr.
[13 lines not shown]
[RISCV] Use append TableGen feature in RISCVInstrInfoP.td. NFC (#200110)
I may go back and adjust some formatting in a follow up. I wanted to
keep the diff here focused on the Predicates changes.
[DirectX] Check DXContainer's header magic during parsing (#198586)
Check that header magic is 'DXBC' during parsing to avoid random data
being treated like a correct header.
[AMDGPU] Do not combine V_ASHRREV_I16* to make sdwa (#198491)
Do not combine V_ASHRREV_I16* instructions to form sdwa instructions.
These instructions zero-fill the high 16-bits.
---------
Signed-off-by: John Lu <John.Lu at amd.com>
[PowerPC] Optimize vec_splats of small FP values on Power8/9 (#199538)
Recognize small constant FP splats representable as integers and lower
them to vspltisw + xvcvsxwdp/xvcvsxwsp on Power8/9, avoiding constant
pool loads.
[lit] Refactor super() calls in ResultCode (#199891)
This PR simplifies the `super()` call in `ResultCode.__new__`
by migrating from the Python 2 style explicit arguments to the
standard Python 3 zero-argument syntax.
This PR is part of the "GSoC 2026: Improving lit" project.
Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
[DAGCombiner] Loop unfreeze step in visitFREEZE freezeOtherUses (#200120)
The first ReplaceAllUsesOfValueWith in visitFREEZE's freezeOtherUses
block can leave users of N behind: when the inner RAUW cascade
encounters a freeze user whose hash collides post-mutation, the
recursive merge prepends new freeze users to N's use-list that the outer
iterator deliberately skips (PR3018 invariant). Those leftover users
then collide with the self-cycle the next RAUW step creates, firing
"Node is not in map!" in RemoveNodeFromCSEMaps.
Wrap the unfreeze in a convergence loop so all such prepended users are
drained before the second RAUW. Each iteration strictly shrinks N's
use-set, bounded by the depth of the freeze chain.
Fixes #198094
[flang][OpenMP] Fix declare reduction accessibility in module scope (#197078)
Fix four interacting issues with OpenMP declare reduction accessibility
when reductions are declared in Fortran modules:
1. Accessibility propagation (resolve-names.cpp): Reduction symbols like
`op.+` had no linkage to the corresponding `operator(+)` accessibility.
`ApplyDefaultAccess()` now reverse-maps mangled names to their Fortran
identifiers and inherits operator/procedure accessibility.
2. USE-associated duplicate detection (resolve-names.cpp):
`FindSymbol()`
searched parent scopes and found USE-associated symbols, causing false
"Duplicate definition" errors. Changed to scope-local `FindInScope()`
with proper `UseDetails` handling that shadows USE symbols.
3. Module file serialization (mod-file.cpp): `PutUserReduction()` never
emitted accessibility, so PRIVATE was lost on module file round-trips.
Now emits `private::<identifier>` when no GenericDetails symbol already
[21 lines not shown]
[lit] Replace zip(range(len(x)), x) with enumerate(x) in ProgressBar (#199884)
Updated `ProgressBar.py` to replace four instances of
`zip(range(len(x)), x)` with `enumerate(x)`. The former is a legacy
Python 2 pattern, while `enumerate()` is the modern and efficient Python
3 idiom. This is a clean-up refactor that results in no behavioral
changes to the code.
This PR is part of the "GSoC 2026: Improving lit" project.
Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
[mlir][EmitC] Include DeallocOp in AllocOp memref conversion tests (#198275)
This PR helps keep changes introduced in
https://github.com/llvm/llvm-project/pull/194591 visible, by renaming
files in a separate commit.
[z/OS][tests] XFAIL using aliases on z/OS (#200176)
This PR XFAIL 2 lit test cases as the following errors are expected:
```
FAIL: LLVM :: CodeGen/Generic/available_externally_alias.ll
# | <unknown>:0: error: Only aliases to functions is supported in GOFF.
FAIL: LLVM :: CodeGen/Generic/2009-03-17-LSR-APInt.ll
# | <unknown>:0: error: Weak alias/reference not supported on z/OS
```
[clang][modules-driver] Precompile std modules independently of -o and final phase (#199289)
With this, Standard library modules are always precompiled as the
primary output of their `-cc1` invocation, instead of being produced as
a byproduct of compiling the Standard library modules to object files.
This also keeps Standard library module precompilation independent of
the final phase specified on the command line, so importing them keep
working under `-fsyntax-only` (and other command-line options that
specify the final phase).
This also makes the Standard library module precompilation independent
of the `-o` flag, so that a command like `clang -std=c++23
-fmodules-driver main.cpp -o main` no longer redirects the Standard
library module outputs to 'main', breaking the compilation.
[lit] Handle config loading safely (#200168)
Currently, the config file is opened outside the `try` block without
explicit encoding and handled with a bare `except`.
We can move to putting a `with open()` context manager inside the `try`
block and catching OSError.
Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
[SPIR-V] Add s128 to allPtrsScalarsAndVectors in legalizer (#199998)
Without this, i128 G_ICMP fails legalization before OpTypeInt emits the
diagnostic
---------
Co-authored-by: Dmitry Sidorov <dsidorov at amd.com>
[IR] Avoid caching a DenseMap reference across erase in handleOperandChangeImpl. NFC (#200179)
They bind a reference into the map and write through it after erasing
the old entry. This will not hold for backward-shift deletion. Extracted
from #199615