aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectOptimize.cpp
diff options
context:
space:
mode:
authorUsman Nadeem <mnadeem@quicinc.com>2024-12-25 01:29:01 -0800
committerGitHub <noreply@github.com>2024-12-25 01:29:01 -0800
commit5fb57131b744c52f74919f9487f4a9fa69f455fb (patch)
tree23df3d582e74fa0825bedf6780d43476551c1285 /llvm/lib/CodeGen/SelectOptimize.cpp
parentae435adabba2f137fe50749c0581157a89019b5e (diff)
downloadllvm-5fb57131b744c52f74919f9487f4a9fa69f455fb.zip
llvm-5fb57131b744c52f74919f9487f4a9fa69f455fb.tar.gz
llvm-5fb57131b744c52f74919f9487f4a9fa69f455fb.tar.bz2
[DFAJumpThreading] Don't bail early after encountering unpredictable values (#119774)
After #96127 landed, mshockwave reported that the pass was no longer threading SPEC2006/perlbench. After 96127 we started bailing out in `getStateDefMap` and rejecting the transformation because one of the unpredictable values was coming from inside the loop. There was no fundamental change in that function except that we started calling `Loop->contains(IncomingBB)` instead of `LoopBBs.count(IncomingBB)`. After some analysis I came to the conclusion that even before 96127 we would reject the transformation if we provided large enough limits on the path traversal (large enough so that LoopBBs contained blocks corresponding to that unpredictable value). In this patch I changed `getStateDefMap` to not terminate early on finding an unpredictable value, this is because `getPathsFromStateDefMap`, later, actually has checks to ensure that the final list of paths only have predictable values. As a result we can now partially thread functions like `negative6` in the tests that have some predictable paths. This patch does not really have any compile-time impact on the test suite without `-dfa-early-exit-heuristic=false` (early exit is enabled by default). Change-Id: Ie1633b370ed4a0eda8dea52650b40f6f66ef49a3
Diffstat (limited to 'llvm/lib/CodeGen/SelectOptimize.cpp')
0 files changed, 0 insertions, 0 deletions