summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2019-04-12 18:48:46 +0000
committerAlina Sbirlea <asbirlea@google.com>2019-04-12 18:48:46 +0000
commit57769382b1fb5f597e503eebc5cf302e87cc7e16 (patch)
tree3e61a0bad74463c15b3ffac6fba1328975af7c00 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent11bbb5831ba5d5823bccea7f84eaaab54276e32c (diff)
downloadbcm5719-llvm-57769382b1fb5f597e503eebc5cf302e87cc7e16.tar.gz
bcm5719-llvm-57769382b1fb5f597e503eebc5cf302e87cc7e16.zip
[MemorySSA] Small fix for the clobber limit.
Summary: After introducing the limit for clobber walking, `walkToPhiOrClobber` would assert that the limit is at least 1 on entry. The test included triggered that assert. The callsite in `tryOptimizePhi` making the calls to `walkToPhiOrClobber` is structured like this: ``` while (true) { if (getBlockingAccess()) { // calls walkToPhiOrClobber } for (...) { walkToPhiOrClobber(); } } ``` The cleanest fix is to check if the limit was reached inside `walkToPhiOrClobber`, and give an allowence of 1. This approach not make any alias() calls (no calls to instructionClobbersQuery), so the performance condition is enforced. The limit is set back to 0 if not used, as this provides info on the fact that we stopped before reaching a true clobber. Reviewers: george.burgess.iv Subscribers: jlebar, Prazek, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60479 llvm-svn: 358303
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud