llvm-capstone/llvm/test/Analysis/MemorySSA
Alina Sbirlea 57769382b1 [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
2019-04-12 18:48:46 +00:00
..
assume.ll
atomic-clobber.ll
basicaa-memcpy.ll
constant-memory.ll
cyclicphi.ll
forward-unreachable.ll
function-clobber.ll
function-mem-attrs.ll
invariant-groups.ll
lifetime-simple.ll
load-invariant.ll
many-dom-backedge.ll
many-doms.ll
multi-edges.ll
multiple-backedges-hal.ll
multiple-locations.ll
no-disconnected.ll
optimize-use.ll [MemorySSA] Limit clobber walks. 2019-03-29 21:56:09 +00:00
phi-translation.ll [MemorySSA] Limit clobber walks. 2019-03-29 21:56:09 +00:00
pr28880.ll
pr36883.ll
pr39197.ll [MemorySSA & SimpleLoopUnswitch] Update MemorySSA in ReplaceUsesOfWith. 2019-02-26 19:44:52 +00:00
pr40037.ll [MemorySSA] Update test with minimized one. NFCI 2019-02-22 07:34:54 +00:00
pr40038.ll [MemorySSA & LoopPassManager] Resolve PR40038. 2019-02-22 07:18:37 +00:00
pr40509.ll
pr40749.ll [MemorySSA] Make insertDef insert corresponding phi nodes. 2019-02-27 22:20:22 +00:00
pr40754.ll [MemorySSA] Make insertDef insert corresponding phi nodes. 2019-02-27 22:20:22 +00:00
pr41254.ll [MemorySSA] Don't optimize incomplete phis. 2019-03-29 21:16:31 +00:00
ptr-const-mem.ll
reduce_clobber_limit.ll [MemorySSA] Small fix for the clobber limit. 2019-04-12 18:48:46 +00:00
volatile-clobber.ll