[all-commits] [llvm/llvm-project] a257e2: [SCEV] Introduce loop-uniform SCEV classification....
Ming Yan via All-commits
all-commits at lists.llvm.org
Wed May 6 02:01:09 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a257e2aa4eb47ad340915136228cd28d918e8dc2
https://github.com/llvm/llvm-project/commit/a257e2aa4eb47ad340915136228cd28d918e8dc2
Author: Ming Yan <ming.yan at terapines.com>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M llvm/include/llvm/Analysis/ScalarEvolution.h
M llvm/lib/Analysis/ScalarEvolution.cpp
M llvm/test/Analysis/ScalarEvolution/becount-invalidation.ll
M llvm/test/Analysis/ScalarEvolution/different-loops-recs.ll
M llvm/test/Analysis/ScalarEvolution/exact-exit-count-more-precise.ll
M llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
M llvm/test/Analysis/ScalarEvolution/flags-from-poison-noautogen.ll
M llvm/test/Analysis/ScalarEvolution/incorrect-exit-count.ll
M llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info-rewrite-expressions.ll
M llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
M llvm/test/Analysis/ScalarEvolution/max-expr-cache.ll
M llvm/test/Analysis/ScalarEvolution/outer_phi.ll
M llvm/test/Analysis/ScalarEvolution/scev-dispositions.ll
M llvm/test/Analysis/ScalarEvolution/trivial-phis.ll
M llvm/test/Analysis/ScalarEvolution/two-loop-latches.ll
M llvm/test/Analysis/ScalarEvolution/zext-add.ll
Log Message:
-----------
[SCEV] Introduce loop-uniform SCEV classification. (#194304)
This patch extends `ScalarEvolution::LoopDisposition` with a new
`LoopUniform` state to describe SCEVs that are invariant across all
iterations of a given loop, but may still depend on inner-loop induction
variables.
Unlike `LoopInvariant`, which requires the value to be fully invariant
with respect to the loop, LoopUniform captures expressions that do not
depend on the loop’s own induction variables, yet may vary in nested
loops. This distinction is useful for analyses and optimizations that
reason about per-iteration stability at a specific loop level.
Example:
```
for (i)
for (j)
dep(j); // uniform w.r.t. i
dep(i, j); // not uniform w.r.t. i
```
This enables us to more precisely reason about the behavior of SCEV in
the context of nested loops, which is very useful for optimizations such
as `LoopUnrollAndJam` and `OuterLoopVectorization`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list