[PATCH] D60479: [MemorySSA] Small fix for the clobber limit.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 12:00:31 PDT 2019
asbirlea created this revision.
asbirlea added a reviewer: george.burgess.iv.
Herald added subscribers: Prazek, jlebar.
Herald added a project: LLVM.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D60479
Files:
lib/Analysis/MemorySSA.cpp
test/Analysis/MemorySSA/reduce_clobber_limit.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60479.194375.patch
Type: text/x-patch
Size: 5263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190409/1c0ee373/attachment.bin>
More information about the llvm-commits
mailing list