[CodeGen] Add initial multi-def rematerialization support
This significantly improves support for rematerializing registers
with more than one definition. In particular, this includes cases where
different lanes of a register are defined over multiple instructions.
There are still a few restrictions that can hopefully be relaxed in the
future.
- All defining instructions must be part of the same rematerialization
region.
- No pure user of the register (i.e., an MI that doesn't also defined a
part of the register) must read the register before its last
definition.
These constraints ensure that the underlying DAG representation
maintained by the rematerializer is still valid, making this a
relatively incremental improvement.
[CIR] Lower C++23 static call/subscript operators correctly
C++23 static `operator()` (P1169R4) and static `operator[]` (P2589R1)
still produce a CXXOperatorCallExpr in the AST, but the resolved
CXXMethodDecl is static, so they should be lowered as ordinary static
function calls -- not routed through the implicit-object member call
path.
CIRGenFunction::emitCallExpr previously dispatched any
CXXOperatorCallExpr whose callee was a CXXMethodDecl into
emitCXXOperatorMemberCallExpr, which asserts md->isInstance(). Every
C++23 static-operator call therefore hit:
Assertion `md->isInstance() &&
"Trying to emit a member call expr on a static method!"' failed
This dominates libcxx-with-CIR failures (~33% of fails in a partial
`std/` run on the May 2026 ClangIR baseline) since recent libcxx
threads `static constexpr operator()` through its functor types.
[27 lines not shown]
Fix ZFS page validation and Next button reliability
Replace the swap size text entry with a SpinButton capped to the
selected disk size, consolidate _disk_count_valid and _update_next_button
into a single _is_ready method that checks all preconditions, update the
Next button from on_password_changed so it disables when passwords stop
matching, re-enable the Next button in back_page so navigating back no
longer leaves it stuck disabled, reduce the left panel gap, and fix a
startup crash from mirror_selection firing before swap_entry was created.
[Support] Faster line and column lookup in SourceMgr (#195881)
Previously line and column lookup worked by finding the line number by
utilizing a cache of offsets of line ends. And finding the column number
by linear search of a previous newline. This is quite slow and caused
some issues after merging #174566 and was fixed by wrapping all calls of
the slow function in a `if (ParserContext)` in #180068. This is not
ideal, since when the parser context would be supplied the parsing of
files with long lines will take ages.
This PR implements a fix to the problem by utilizing the computed
offsets for line ends to calculate the position on the current line.
Thus improving the asymptotic complexity of the getLineAndColumn method
from O(log l + c) to O(log l) (l is number of lines, c is column
position of the pointer). While not adding any overhead.
The second commit in this PR just updates two comments that I thought
were misleading.
[2 lines not shown]
[Instrumentor] Allow multiple config files with different filters
To instrument different functions in different ways we allow to provide
multiple config files now. Each file will result in one instrumentation
run. Multiple files can be passed via command line option or listed in
a "summary" file that is passed via command line option (to keep the
command length managable).
[Instrumentor] Add a global function regexp to limit the instrumentation (#197577)
Only functions that match the "function_regex" will be instrumented, or
if they have the instrumentation attribute.
Duplicate of https://github.com/llvm/llvm-project/pull/196234 because I
messed up the stacked commits.
[MLIR][XeGPU] Honor convert_layout's input_layout when resolving layout conflict (#194935)
This PR changes getConsumerLayoutAt now to return the input_layout
attribute directly when the consuming op is xegpu.convert_layout, since
its required operand layout is explicitly declared rather than inferable
from the result. This lets ResolveLayoutConflicts detect a real mismatch
against the producer's layout and insert a bridging convert_layout,
instead of being masked by the fallback that returned the producer's own
layout.
[SSAF] Let UnsafeBufferUsageExtractor & PointerFlowExtractor ignore templates
Templates are ignored for two reasons:
- Template instantiations are still handled. Template facts can be
inferred from their instantiations.
- Template ASTs may have extra kinds of expressions (e.g.,
ParenListExpr) that are hard to handle because of their dependent
nature.
[SSAF] Increase Expr kind coverage in EntityPointerLevelTranslator
Add support for more kinds of Expr that can be translated to
EntityPointerLevel(s).
Additionally, fix bugs in PointerFlowExtractor discovered by tests
added for the new Expr kinds.
[CodeGen] Add initial multi-def rematerialization support
This significantly improves support for rematerializing registers
with more than one definition. In particular, this includes cases where
different lanes of a register are defined over multiple instructions.
There are still a few restrictions that can hopefully be relaxed in the
future.
- All defining instructions must be part of the same rematerialization
region.
- No pure user of the register (i.e., an MI that doesn't also defined a
part of the register) must read the register before its last
definition.
These constraints ensure that the underlying DAG representation
maintained by the rematerializer is still valid, making this a
relatively incremental improvement.
(math/R) Updated 4.5.2 to 4.5.3, another update may follow,:
CHANGES IN R 4.5.3:
UTILITIES:
* tools/fetch-recommended can be used instead of
tools/rsync-recommended to fetch recommended packages into R
sources using curl on systems without rsync or behind firewalls.
PACKAGE INSTALLATION:
* C++ standard specifications (CXX_STD = in src/Makevars* and in
the SystemRequirements field of the DESCRIPTION file) are now
checked more thoroughly. Invalid values are still ignored but
now give a warning, as do contradictory specifications.
* (Preliminary) support for C++26 has been extended to Windows.
[51 lines not shown]
[Instrumentor] Add unreachable support; unreachable stack trace printing (#197339)
Allow to instrument unreachable and provide a use case to identify an
unreachable was reached.
Duplicate of https://github.com/llvm/llvm-project/pull/195408 as I can't
use GH properly.
[SSAF] Increase Expr kind coverage in EntityPointerLevelTranslator
Add support for more kinds of Expr that can be translated to
EntityPointerLevel(s).
Additionally, fix bugs in PointerFlowExtractor discovered by tests
added for the new Expr kinds.
[CIR] Allow local goto within cleanup regions (#197539)
Until now, CIR's FlattenCFG pass reported an NYI error any time a goto
operation was found within a cleanup scope region. This change loosens
that restriction to allow goto operations that transfer to another block
within the same cleanup region. This case doesn't require any change in
the cleanup scope flattening. It just has to be detected and ignored.
The goto will be lowered as it is when no cleanup scope is present.
We are still reporting an NYI error in cases where a goto operation
branches out of the cleanup scope. That will be implemented in a
follow-up change.
Assisted-by: Cursor / claude-opus-4.7-thinking-xhigh
Fix regressions in OpenMP V&V and Fujitsu testsuites
The users iterator apparently becomes invalid after one of its uses is
replaced. Fix this by making a copy of the list of users.
Reland "[flang][OpenMP] Fix lowering of LINEAR iteration variables (#188851)"
Linear iteration variables were being treated as private. This fixes
one of the issues reported in #170784.
The regressions in the OpenMP V&V and Fujitsu testsuites happened
because the users iterator was apparently becoming invalid, after one of
its uses was replaced. This was fixed by making a copy of the list of
users.
[flang] Exclude procedure scope variables in isModuleScopeDataUniquedName (#192999)
In particular, for saved local such as `x` in the sample below,
isModuleScopeDataUniquedName should return false.
```
module m
contains
subroutine foo()
integer, save :: x ! <-- SAVE
end subroutine
end
```
[CIR] Make collectUnreachable more robust (#197334)
The CXXABILowering and LowerToLLVM passes both use a
`collectUnreachable` function to find unreachable blocks and add them to
a SmallVector that will be passed to `applyPartialConversion` to avoid
leaving unconverted operations in the dead blocks. We can't simply call
`eraseUnreachableBlocks` because we don't yet protect indirect branch
and goto targets from being erased.
Application testing revealed that our `collectUnreachable` function was
missing blocks in SCCs, because they were connected to each other. This
change revises `collectUnreachable` to instead build a list of reachable
blocks and then walk all blocks to find the ones that aren't in the
reachable list (which is what `eraseUnreachableBlocks` does).
Assisted-by: Cursor / claude-opus-4.7-thinking-xhigh