Skip to content

Commit 97cd81b

Browse files
committed
Use BatchAA
Signed-off-by: John Lu <[email protected]>
1 parent 0322b92 commit 97cd81b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Transforms/Scalar/Sink.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ STATISTIC(NumSinkIter, "Number of sinking iterations");
2929

3030
static bool hasStoreConflict(Instruction *Inst, AliasAnalysis &AA,
3131
SmallPtrSetImpl<Instruction *> &Stores) {
32+
BatchAAResults BatchAA(AA);
33+
3234
if (LoadInst *L = dyn_cast<LoadInst>(Inst)) {
3335
MemoryLocation Loc = MemoryLocation::get(L);
3436
for (Instruction *S : Stores)
35-
if (isModSet(AA.getModRefInfo(S, Loc)))
37+
if (isModSet(BatchAA.getModRefInfo(S, Loc)))
3638
return true;
3739
} else if (auto *Call = dyn_cast<CallBase>(Inst)) {
3840
for (Instruction *S : Stores)
39-
if (isModSet(AA.getModRefInfo(S, Call)))
41+
if (isModSet(BatchAA.getModRefInfo(S, Call)))
4042
return true;
4143
}
4244
return false;

0 commit comments

Comments
 (0)