[MLIR][PDL] Use scoped map for ConstraintQuestion mapping (#228081)
Two parallel branches can depend on the same constraint, however, they
can't refer to the same ApplyConstraintOp if it lives in one of the two
branches.
The test fails on main with:
```
input.mlir:18:3: error: operand #1 does not dominate this use
pdl.pattern @rewrite_b : benefit(1) {
^
input.mlir:1:1: note: operand defined here (op in the same region)
module @constraint_with_result_in_sibling_branches {
^
```
this happens because the else branch refers to the wrong value for the
constraint:
```mlir
pdl_interp.func @matcher(%arg0: !pdl.operation) {
pdl_interp.switch_operation_name of %arg0 to ["test.a", "test.b"](^bb2, ^bb6) -> ^bb1
[25 lines not shown]
Hexagon: Track condset source kills without kill flags in ExpandCondsets
Kill flags are no longer allowed on virtual registers, but this pass
was relying on them as intra-pass scratch state to decide which
transfers can be predicated and cleared them at the end with
clearKillFlags. Record the killing source operands in a pass-local set
instead. This also drops the kill recomputation in the final liveness
update, whose result was only ever discarded.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[flang][OpenMP] Generalize type compatibility check for reductions (#242354)
Instead of checking the types manually, use a pre-existing function from
the Evaluate library.
[flang][OpenMP] Simplify check for DISTRIBUTE/LINEAR restriction, NFC (#243169)
Use `CollectAffectedDoLoops` instead of traversing the loop nest by
hand.
IR: Remember if PreservedAnalyses preserves all analyses (#243126)
Most PreservedAnalyses queries first check if the preserved set contains
AllAnalysesKey. Keep that in a flag, so checking the analyses during
invalidation doesn't need to search the set for it each time.
callgrind instructions, opt -O3: kimwitu++ k.bc -0.33%, SPASS cnf.bc
-0.07%, consumer-typeset z08.bc -0.04%, sqlite3 -0.03%. CTMark
instructions:u: O3 -0.03%, ThinLTO -0.02%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Test each clause of the uniform condition check in the OR fold
The OR-to-select fold skips a divergent OR whose uniform condition has
another use. or_sext_bool_uniform_cond_shared covers that bail-out, but
nothing covered the cases each clause lets through.
Add tests for a single-use uniform condition, a shared divergent
condition, and a uniform OR with a shared condition. All three still
fold. Dropping any one clause of the check now changes one of them.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>