diff options
author | Yevgeny Rouban <yrouban@azul.com> | 2023-06-08 16:32:12 +0700 |
---|---|---|
committer | Yevgeny Rouban <yrouban@azul.com> | 2023-06-19 11:10:01 +0700 |
commit | 1ebbbf1614cfdbf6d78f4f2a665cdea9cbb2beb8 (patch) | |
tree | a17d12194ecbc20174beee6d96c895e5f89db636 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | 2d8044ee8b19f23e0a7fe5cd35876515d0d1d72e (diff) | |
download | llvm-1ebbbf1614cfdbf6d78f4f2a665cdea9cbb2beb8.zip llvm-1ebbbf1614cfdbf6d78f4f2a665cdea9cbb2beb8.tar.gz llvm-1ebbbf1614cfdbf6d78f4f2a665cdea9cbb2beb8.tar.bz2 |
[LoopUnrollRuntime] Allow indirect transition to deopt non-latch exit blocks
Relax condition on runtime trip count unrolling loops with 1 non-latch exit
that leads to a deop block.
There are cases when the deopt blocks are common exits for different loops.
LoopSimplify pass splits such edges to the common deopting blocks to make
sure that all exit nodes of the loop only have predecessors that are inside
of the loop (See simplifyOneLoop()). This breaks the current condition for
unrolling. This patch allows the split transitive blocks that still lead to
the deopting blocks.
Differential Revision: https://reviews.llvm.org/D152639
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index b19156b..1e22eca 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -457,7 +457,7 @@ static bool canProfitablyUnrollMultiExitLoop( // call. return (OtherExits.size() == 1 && (UnrollRuntimeOtherExitPredictable || - OtherExits[0]->getTerminatingDeoptimizeCall())); + OtherExits[0]->getPostdominatingDeoptimizeCall())); // TODO: These can be fine-tuned further to consider code size or deopt states // that are captured by the deoptimize exit block. // Also, we can extend this to support more cases, if we actually |