[llvm] [polly] [SCEV] Introduce SCEVUse, use it instead of const SCEV * (NFCI). (PR #91961)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 09:05:44 PST 2026
fhahn wrote:
Before landing, just to recap on the compile-time impact of the change and follow-up changes needed
* This patch https://llvm-compile-time-tracker.com/compare.php?from=0d2c7d71744108fcfcbfb6258994da2c008314ba&to=2a95465d6980bfb3ebc45de18a55da97abef97d8&stat=instructions:u
```
stage1-O3 stage1-ReleaseThinLTO stage1-ReleaseLTO-g stage1-O0-g stage1-aarch64-O3 stage1-aarch64-O0-g stage2-O3 stage2-O0-g stage2-clang
(+0.01%) (+0.03%) (+0.01%) (-0.00%) (+0.03%) (-0.01%) (+0.04%) (+0.02%) (+0.05%)
```
* Adding a canonical SCEV pointer (just initialized to itself for now) and used for compares (https://github.com/llvm/llvm-project/pull/185040): changes in the noise
* Creating canonical SCEV expressions for each SCEV at construction (https://github.com/llvm/llvm-project/pull/185042#issuecomment-4012855669) https://llvm-compile-time-tracker.com/compare.php?from=10021f0211c94d3a1d37434803acb48c08acea81&to=1bdee8bd0efaf88945213ec130af0a3a6a88dcbc&stat=instructions:u
```
stage1-O3 stage1-ReleaseThinLTO stage1-ReleaseLTO-g stage1-O0-g stage1-aarch64-O3 stage1-aarch64-O0-g stage2-O3 stage2-O0-g stage2-clang
(+0.06%) (+0.05%) (+0.02%) (+0.01%) (+0.04%) (-0.01%) (-0.03%) (-0.01%) (+0.01%)
```
Note that this is still with the flags never being != 0, so there will be a bit more overhead once some flags are non-zero
https://github.com/llvm/llvm-project/pull/91961
More information about the llvm-commits
mailing list