LLVM/project 583fc69 — llvm/lib/Transforms/Scalar ConstantHoisting.cpp

[ConstantHoisting] Use getLazyBFIAnalysisUsage

Follow up from https://github.com/llvm/llvm-project/pull/235482#discussion_r4379834843, switch it to a transitive dependency.
DeltaFile
+1-1llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
+1-11 files

LLVM/project 497fe31 — llvm/test/Transforms/SLPVectorizer/RISCV strided-loads-based-reduction.ll

Update SLP test
DeltaFile
+72-200llvm/test/Transforms/SLPVectorizer/RISCV/strided-loads-based-reduction.ll
+72-2001 files

LLVM/project 8a3aafa — llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel variance-8x16.ll

Update tests
DeltaFile
+98-196llvm/test/Transforms/LoopVectorize/WebAssembly/CostModel/variance-8x16.ll
+98-1961 files

LLVM/project 81793ac — llvm/include/llvm/Analysis ValueTracking.h, llvm/include/llvm/IR ConstantFPRange.h

[KnownFPClass] Refactor NaN sign encoding for KnownFPClass (#220606)

Part of https://github.com/llvm/llvm-project/issues/217072

Replaces the `struct` layout for `KnownFPClass`
```c++
struct KnownFPClass {
  FPClassTest KnownFPClasses;
  std::optional<bool> SignBit;
};
struct KnownFPClass {
  FPClassMask KnownFPMask;
};
```
I also added conversion functions between `FPClassTest` and
`FPClassMask`.
DeltaFile
+256-78llvm/include/llvm/Support/KnownFPClass.h
+5-19llvm/lib/Support/KnownFPClass.cpp
+1-1llvm/include/llvm/IR/ConstantFPRange.h
+1-1llvm/include/llvm/Analysis/ValueTracking.h
+263-994 files

LLVM/project 0ac8e13 — llvm/lib/Target/AMDGPU SIPreEmitPeephole.cpp, llvm/test/CodeGen/AMDGPU si-pre-emit-peephole-unpack-invalidates.mir

[AMDGPU] Report packed F32 unpacking as a change (#234859)

SIPreEmitPeephole::run did not set Changed after unpacking, so when
unpacking was the only change the new pass manager kept every cached
analysis and the legacy one saw an unchanged function.

Assisted-by: Claude Opus 5.5
DeltaFile
+15-0llvm/test/CodeGen/AMDGPU/si-pre-emit-peephole-unpack-invalidates.mir
+2-0llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
+17-02 files

LLVM/project f383f08 — .ci all_requirements.txt, .ci/metrics requirements.lock.txt

Merge branch 'main' of github.com:llvm/llvm-project into users/lukel97/loop-vectorize/cse-replicate-loads
DeltaFile
+1,665-0llvm/test/CodeGen/RISCV/GlobalISel/half-convert.ll
+1,452-0llvm/test/CodeGen/RISCV/GlobalISel/double-convert.ll
+1,190-0llvm/test/CodeGen/RISCV/GlobalISel/float-convert.ll
+433-408.ci/all_requirements.txt
+489-311.ci/metrics/requirements.lock.txt
+199-459llvm/test/CodeGen/AArch64/dup.ll
+5,428-1,178730 files not shown
+24,133-6,443736 files

LLVM/project 0cbb583 — lldb/source/Core PluginManager.cpp, lldb/source/Plugins/ScriptInterpreter/Lua ScriptInterpreterLua.cpp

[lldb] Report why a script interpreter is unavailable (#235947)

When Python can't be loaded, no plugin registers for it and LLDB falls
back to ScriptInterpreterNone, which claims LLDB was built without
scripting support. The real error was dropped during initialization.

Record the error per language in the PluginManager where the failure
happens, and pass the requested language to the create callback so
ScriptInterpreterNone can report it from the relevant commands.

For a language LLDB was built with but has no recorded error, report
that its plugin wasn't loaded.

rdar://190746062

Assisted-by: Claude
DeltaFile
+126-0lldb/unittests/ScriptInterpreter/None/ScriptInterpreterNoneTest.cpp
+108-11lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp
+47-3lldb/source/Core/PluginManager.cpp
+40-3lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h
+21-14lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+13-8lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
+355-3913 files not shown
+439-8019 files

LLVM/project 40ce46b — llvm/lib/Transforms/Scalar CorrelatedValuePropagation.cpp, llvm/test/Transforms/CorrelatedValuePropagation sdiv_missing_debugloc.ll keep_dbg_value_on_rewrite.ll

[DebugInfo] Preserve original value when replacing instructions (#234978)

There are several places in `correlated-propagation` where an
instruction is replaced without salvaging the debug info. The value
computed by the new instruction may be different to the original that
was replaced. This leads to debuggers like lldb reporting incorrect
values for variables (reporting the value of the new instruction).

This PR makes sure the compiler salvages the debug information of the
replaced instructions before replacing them.

(See issues #218621, #218622, #218623 and #218366)
(Pinging @MrEven132, since I can't add as a reviewer)
DeltaFile
+99-0llvm/test/Transforms/CorrelatedValuePropagation/keep_dbg_value_on_rewrite.ll
+3-2llvm/test/Transforms/CorrelatedValuePropagation/sdiv_missing_debugloc.ll
+5-0llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
+107-23 files

LLVM/project ebe1441 — llvm/lib/Transforms/Scalar CorrelatedValuePropagation.cpp, llvm/test/Transforms/CorrelatedValuePropagation eliminated-and-wrong-dbgval.ll

[DebugInfo] Salvage replaced and instructions (#234693)

When `correlated-propagation` removes and instructions, it doesn't
correctly salvage the debug info. This leads to variables having
incorrect debug info. This patch makes sure we salvage the debug info
before removing the instructions

(See https://github.com/llvm/llvm-project/issues/219940)

Pinging @MrEven132 since I can't seem to add as a reviewer
DeltaFile
+35-0llvm/test/Transforms/CorrelatedValuePropagation/eliminated-and-wrong-dbgval.ll
+1-0llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
+36-02 files

LLVM/project 4098467 — compiler-rt/lib/scudo/standalone tsd.h combined.h, compiler-rt/lib/scudo/standalone/tests combined_test.cpp

[scudo] Omit quarantine state when QuarantineDisabled (#235117)

When QuarantineDisabled is true, GlobalQuarantine still occupies 192
bytes (three cache lines) in Allocator and QuarantineCache occupies 32
bytes (plus 32 bytes of cache-line tail padding) in each TSD.

Allows the now empty classes to be empty by using [[no_unique_address]].
DeltaFile
+38-4compiler-rt/lib/scudo/standalone/quarantine.h
+4-2compiler-rt/lib/scudo/standalone/combined.h
+4-0compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+1-0compiler-rt/lib/scudo/standalone/tsd.h
+47-64 files

LLVM/project 349acff — compiler-rt/test/sanitizer_common/android_commands android_run.py

[compiler-rt][Android] Filter out linker warnings from stderr in android_run.py (#235973)

Older Android dynamic linkers (e.g. API 24) print `WARNING: linker: ...`
lines to stderr for newer ELF flags/tags such as `DT_FLAGS_1=0x8000001`
(`DF_1_PIE`) and `DT_AARCH64_BTI_PLT` (`0x70000001`). When these lines
are emitted at startup or when spawning `llvm-symbolizer`, they break
tests using `count 0`, `CHECK-NEXT`, or `CHECK-NOT` on
https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-android.

Strip `^WARNING: linker: .*` lines from stderr in `android_run.py`,
matching `libcxx/utils/adb_run.py`.

Assisted-by: Gemini
DeltaFile
+12-2compiler-rt/test/sanitizer_common/android_commands/android_run.py
+12-21 files

LLVM/project 1da436a — lldb/source/API SBBreakpointName.cpp SBBreakpointLocation.cpp, lldb/source/Commands CommandObjectBreakpointCommand.cpp

[lldb] Return llvm::Error from breakpoint callback setters (#235964)

Have ScriptInterpreter::SetBreakpointCommandCallback and
SetBreakpointCommandCallbackFunction return llvm::Error instead of
Status, converting back to SBError at the API boundary.

Requiring the error to be handled surfaces two dropped errors:

- The Python SetBreakpointCommandCallbackFunction ignored the result of
generating the callback.
- Deserializing a breakpoint reported the outer, still-empty Status
instead of the script error.

Assisted-by: Claude
DeltaFile
+29-40lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+11-17lldb/source/Interpreter/ScriptInterpreter.cpp
+13-15lldb/source/API/SBBreakpointLocation.cpp
+14-13lldb/source/API/SBBreakpointName.cpp
+11-12lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
+9-11lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+87-1085 files not shown
+130-15111 files

LLVM/project ae6955f — lldb/cmake/modules AddLLDB.cmake, lldb/source/Plugins/ScriptInterpreter/Python CMakeLists.txt

[lldb][CMake] Link static libraries before liblldb (#235949)

The static linker resolves each undefined symbol from the first library
on the command line that defines it. When liblldb re-exports private
symbols, for example with LLDB_ENABLE_DYNAMIC_SCRIPTINTERPRETERS, tools
that list liblldb before lldbHost and lldbUtility bind part of those
libraries to liblldb and the rest to their own static copies.

List liblldb last so the static libraries take precedence. On Linux,
`lldb_prevent_liblldb_symbol_interposition` already covers this with
--exclude-libs.
DeltaFile
+16-0lldb/cmake/modules/AddLLDB.cmake
+2-1lldb/unittests/SBTestingSupport/CMakeLists.txt
+1-1lldb/tools/lldb-mcp/CMakeLists.txt
+1-1lldb/tools/lldb-dap/tool/CMakeLists.txt
+1-1lldb/tools/driver/CMakeLists.txt
+1-1lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+22-53 files not shown
+24-79 files

LLVM/project 7f80ef0 — .github/workflows libcxx-lnt-submit.yml lnt-submit.yml, libcxx/utils/ci run-buildbot

[ci] Create a monorepo-wide workflow to submit to LNT (#235863)

Lift the libc++ specific workflow into one that is clearly decoupled
from libc++ and can be reused by other projects in the monorepo. This is
intended to support other projects submitting data into LNT.

One interesting question is whether we want all jobs to use the same
token. In LNT v5, a token can be scoped to specific test suites (e.g. a
token can be limited to submitting only to the libcxx test suite). Right
now, this workflow assumes that the token in use can submit to the
provided suite, and all submissions would use the same token, which
would be unscoped.

I think this is fine, at least for now, but we could potentially revisit
this decision in the future.
DeltaFile
+537-0.github/workflows/lnt-submit.requirements.lock.txt
+0-94libcxx/utils/ci/lnt/submit-benchmarks
+79-0.github/workflows/lnt-submit.yml
+0-75.github/workflows/libcxx-lnt-submit.yml
+1-9libcxx/utils/ci/run-buildbot
+7-2libcxx/utils/ci/lnt/README.md
+624-1806 files not shown
+633-18512 files

LLVM/project a060b7a — utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[Bazel] Fixes 77cb171 (#235969)

This fixes 77cb1713c233b90d322c37b808c023fcdb9008ff (#235950).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=77cb1713c233b90d322c37b808c023fcdb9008ff

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project 9720726 — mlir/include/mlir/Conversion Passes.td, mlir/lib/Conversion/MathToFuncs MathToFuncs.cpp

[mlir][math] Add a set-llvm-linkage option to convert-math-to-funcs (#235961)

`--convert-math-to-funcs` adds a `llvm.linkage` attribute to each
generated function (which is consumed by FuncToLLVM), but this breaks
other pipelines, such as FuncToEmitC, since `mlir-translate
--mlir-to-cpp` registers only the cf, emitc and func dialects (but not
llvm) so

```
  mlir-opt --convert-math-to-funcs --convert-arith-to-emitc  --convert-func-to-emitc in.mlir \
    | mlir-translate --mlir-to-cpp --declare-variables-at-top
```

fails on, e.g., `math.ipowi` with "#llvm.linkage<...> attribute created
with unregistered dialect".

This adds a `set-llvm-linkage` option to `--convert-math-to-funcs`
(default on) and leaves the attribute off when the flag is set to off.
DeltaFile
+29-18mlir/lib/Conversion/MathToFuncs/MathToFuncs.cpp
+13-0mlir/test/Conversion/MathToFuncs/no-llvm-linkage.mlir
+5-1mlir/include/mlir/Conversion/Passes.td
+47-193 files

LLVM/project 3c3e1ee — llvm/lib/Target/WebAssembly/GISel WebAssemblyPreLegalizerCombiner.cpp WebAssemblyPostLegalizerCombiner.cpp

[WebAssembly] Fix Analysis Preservation for GISel Passes (#235960)

These are preserved by the LegacyPM so also mark them as preserved by
the NewPM versions.
DeltaFile
+2-0llvm/lib/Target/WebAssembly/GISel/WebAssemblyPreLegalizerCombiner.cpp
+2-0llvm/lib/Target/WebAssembly/GISel/WebAssemblyPostLegalizerCombiner.cpp
+4-02 files

LLVM/project 6b01e97 — llvm/lib/Target/RISCV RISCV.h RISCVCodeGenPassBuilder.cpp, llvm/lib/Target/RISCV/GISel RISCVO0PreLegalizerCombiner.cpp RISCVPostLegalizerCombiner.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+102-27llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+67-26llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+35-35llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+43-19llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp
+24-1llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+18-4llvm/lib/Target/RISCV/RISCV.h
+289-1123 files not shown
+306-1169 files

LLVM/project f7ec3b6 — llvm/lib/Target/RISCV RISCV.h RISCVCodeGenPassBuilder.cpp, llvm/lib/Target/RISCV/GISel RISCVO0PreLegalizerCombiner.cpp RISCVPostLegalizerCombiner.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+102-27llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+68-29llvm/lib/Target/RISCV/GISel/RISCVPreLegalizerCombiner.cpp
+67-26llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+35-35llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+43-19llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp
+27-6llvm/lib/Target/RISCV/RISCV.h
+342-1424 files not shown
+387-14910 files

LLVM/project f2923e8 — llvm/lib/Target/RISCV RISCV.h RISCVCodeGenPassBuilder.cpp, llvm/lib/Target/RISCV/GISel RISCVO0PreLegalizerCombiner.cpp RISCVPostLegalizerCombiner.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+102-27llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+67-26llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+35-35llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+43-19llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp
+24-1llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+18-4llvm/lib/Target/RISCV/RISCV.h
+289-1123 files not shown
+306-1169 files

LLVM/project 9a7f6b1 — llvm/lib/Target/RISCV RISCV.h RISCVCodeGenPassBuilder.cpp, llvm/lib/Target/RISCV/GISel RISCVPostLegalizerCombiner.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+102-27llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+67-26llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+35-35llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+24-1llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+9-2llvm/lib/Target/RISCV/RISCV.h
+9-0llvm/test/CodeGen/RISCV/O0-newpm-pipeline.ll
+246-912 files not shown
+250-938 files

LLVM/project cd9f3a4 — llvm/lib/Target/RISCV RISCV.h RISCVCodeGenPassBuilder.cpp, llvm/lib/Target/RISCV/GISel RISCVPostLegalizerCombiner.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+102-27llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+67-26llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+35-35llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+24-1llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+9-2llvm/lib/Target/RISCV/RISCV.h
+9-0llvm/test/CodeGen/RISCV/O0-newpm-pipeline.ll
+246-912 files not shown
+250-938 files

LLVM/project f8f1eca — llvm/lib/Target/RISCV RISCV.h RISCVCodeGenPassBuilder.cpp, llvm/lib/Target/RISCV/GISel RISCVO0PreLegalizerCombiner.cpp RISCVPostLegalizerCombiner.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+102-27llvm/lib/Target/RISCV/RISCVCodeGenPassBuilder.cpp
+67-26llvm/lib/Target/RISCV/GISel/RISCVPostLegalizerCombiner.cpp
+35-35llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+43-19llvm/lib/Target/RISCV/GISel/RISCVO0PreLegalizerCombiner.cpp
+24-1llvm/test/CodeGen/RISCV/O3-newpm-pipeline.ll
+18-4llvm/lib/Target/RISCV/RISCV.h
+289-1123 files not shown
+306-1169 files

LLVM/project cbd324c — lldb/source/Expression DWARFExpression.cpp DWARFExpressionList.cpp, lldb/source/Symbol UnwindPlan.cpp

[lldb] Don't link DWARFUnit to print DWARF expressions (#229798)

`DWARFExpression::DumpLocation` and `UnwindPlan` pass a null `DWARFUnit`
to `llvm::printDwarfExpression`, and `DWARFExpressionList` prints
addresses with `DWARFFormValue::dumpAddress`. Both link `DWARFUnit` and
`DWARFContext`, which pull in every object file reader and `LLVMCore`.

Use the `printDwarfExpression` overload that takes no unit, and format
the addresses with `format_hex`, which produces the same output.
DeltaFile
+11-5lldb/source/Expression/DWARFExpressionList.cpp
+1-1lldb/source/Symbol/UnwindPlan.cpp
+1-1lldb/source/Expression/DWARFExpression.cpp
+13-73 files

LLVM/project 77cb171 — mlir/lib/Conversion/MathToEmitC MathToEmitCPass.cpp MathToEmitC.cpp, mlir/test/Conversion/MathToEmitC math-to-emitc-failed.mlir math-to-emitc.mlir

[mlir][emitc] Lower remaining C99 <math.h> functions in MathToEmitC (#235950)

`MathToEmitC` was missing lowerings for many `math` ops that C99/C++11
provide as <math.h>/<cmath> functions.

This adds call patterns for `tan`, `atan`, `sinh`, `cosh`, `tanh`,
`asinh`, `acosh`, `atanh`, `exp2`, `expm1`, `log`, `log2`, `log10`,
`log1p`, `cbrt`, `erf`, `erfc`, `trunc`, `copysign` and `fma`, following
the existing patterns. It also lowers `isnan`, `isinf`, `isfinite` and
`isnormal` to the macros of the same name.

Same as for the existing ops/lowerings, fastmath flags are dropped and
since the <math.h> functions use the dynamic rounding mode, ops with a
static rounding mode are also not lowered.

This still isn't full coverage of `math`. `--math-expand-ops` can
rewrite `rsqrt`, `clampf`, `fpowi` and `ctlz`, which have no <math.h>
function, into arith ops this pass lowers, but `ipowi`, `absi`, `cttz`,
`ctpop` and `sincos` still have no lowering.
DeltaFile
+240-0mlir/test/Conversion/MathToEmitC/math-to-emitc.mlir
+64-7mlir/lib/Conversion/MathToEmitC/MathToEmitC.cpp
+24-0mlir/test/Conversion/MathToEmitC/math-to-emitc-failed.mlir
+9-3mlir/lib/Conversion/MathToEmitC/MathToEmitCPass.cpp
+337-104 files

LLVM/project d9c4462 — mlir/include/mlir/Analysis/Presburger IntegerRelation.h, mlir/lib/Analysis/Presburger IntegerRelation.cpp

[mlir][Presburger] Add IntegerRelation::gist (context-based simplification)

Add IntegerRelation::gist(context), a port of ISL's isl_basic_map_gist
(uset_gist / uset_gist_full). It replaces the relation S by a relation
S' such that S' ∩ context == S ∩ context, with as few constraints as
possible: constraints of S that are implied by the context together with
the remaining constraints of S are removed, and the remaining constraints
may be rewritten using the equalities of the context. Outside of the
context S' may differ from S, so the result is only meaningful together
with the context. The result has at most as many constraints as S
(except that the constraints defining a division that is still used may
be restored, see below), never more local variables, and never involves
variables that S does not involve; in particular, locals of the context
are never introduced.

Trivial cases: an obviously empty context yields the universe; if the
intersection with the context is found to be empty later (inconsistent
combined equalities, a context that turns out to be rationally empty, or
an empty combined Simplex), the result is empty; an obviously empty S

    [43 lines not shown]
DeltaFile
+516-0mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp
+277-0mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+47-1mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+35-0mlir/unittests/Analysis/Presburger/IntegerRelationTest.cpp
+34-0mlir/unittests/Analysis/Presburger/Utils.h
+909-15 files

LLVM/project 2aba042 — mlir/include/mlir/Analysis/Presburger PresburgerRelation.h, mlir/lib/Analysis/Presburger PresburgerRelation.cpp

[mlir][Presburger] Add PresburgerRelation::gist

Add PresburgerRelation::gist (and PresburgerSet forwarding overloads)
for a convex context and for a context that is itself a union of
disjuncts, following ISL's isl_map_gist / isl_map_gist_basic_map.

For a convex context, each disjunct is simplified separately with
IntegerRelation::gist; disjuncts that become empty are dropped and if any
disjunct becomes the universe, the universe is returned.

For a non-convex context, the trivial cases (universe set or context,
empty context, equal set and context, context being a subset of the
set) are handled first. Otherwise, the context is approximated by a
convex set. Instead of ISL's unshifted simple hull of the context and the
set, we use the universe together with all constraints of the disjuncts
of the context and of the set that are valid for every disjunct of the
context (checked with Simplex); including the constraints of the set
allows removing constraints that are implied by every disjunct of the
context even if they are not implied by the simple hull.
DeltaFile
+137-0mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
+122-0mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
+37-0mlir/unittests/Analysis/Presburger/PresburgerRelationTest.cpp
+23-0mlir/include/mlir/Analysis/Presburger/PresburgerRelation.h
+319-04 files

LLVM/project 62a40aa — mlir/include/mlir/Analysis/Presburger IntegerRelation.h, mlir/lib/Analysis/Presburger IntegerRelation.cpp

[mlir][Presburger] Add IntegerRelation::reduceUsingEqualities helper

Add a protected helper that rewrites all constraints of a relation using
the equalities of another relation in the same space, without changing
the intersection of the two. This is a port of ISL's
isl_basic_set_reduce_using_equalities together with
project_onto_involved: the equalities are first projected onto the
variables that occur in the relation being reduced, so that no new
variables (in particular, no locals of the other relation) are
introduced, and each remaining equality is then used to eliminate its
last variable with a non-zero coefficient from every constraint, so that
later variables (locals) are eliminated in favor of earlier ones.

This is a building block for context-based simplification (gist) and is
exercised by the gist tests added in a follow-up commit, since there is
no existing pattern for unit-testing protected members of
IntegerRelation.

DeltaFile
+108-0mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+17-0mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+125-02 files

LLVM/project 0ed4a5d — mlir/include/mlir/Analysis/Presburger IntegerRelation.h, mlir/lib/Analysis/Presburger IntegerRelation.cpp

[mlir][Presburger] NFC: factor out removeRedundantConstraintsFromSimplex

Split the compaction loops of IntegerRelation::removeRedundantConstraints
into a new protected helper, removeRedundantConstraintsFromSimplex, which
removes the constraints of the relation that are marked redundant in a
given Simplex, where the relation's constraints start at a given offset
in the Simplex (inequalities first, then each equality as a pair).

This allows reusing the same compaction logic when the relation's
constraints have been added to a Simplex that already contains other
constraints, e.g., for context-based simplification (gist), where the
context's constraints come first and are never marked redundant.

DeltaFile
+12-4mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+14-0mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+26-42 files

LLVM/project a138d98 — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/VPlan vplan-printing-branch-weights.ll print-calls.ll

[VPlan] Don't skip adds of wide IVs in makeScalarizationDecisions. (#235589)

makeScalarizationDecisions skipped adds with a wide induction operand,
as narrowing them could leave the wide induction with only scalar users,
which stopped removeRedundantCanonicalIVs from reusing it for the wide
canonical IV.

This is no longer relevant after folding the logic into
replaceWideCanonicalIVWithWideIV, which reuses any remaining canonical
wide induction regardless of its users, so the exclusion is no longer
needed.
DeltaFile
+4-4llvm/test/Transforms/LoopVectorize/VPlan/print-calls.ll
+4-4llvm/test/Transforms/LoopVectorize/VPlan/print-attributes.ll
+0-6llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+2-2llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-branch-weights.ll
+2-2llvm/test/Transforms/LoopVectorize/VPlan/AArch64/scalarize-after-call-widening.ll
+2-2llvm/test/Transforms/LoopVectorize/VPlan/AArch64/call-decisions.ll
+14-201 files not shown
+15-217 files