forked from OSchip/llvm-project
[ModRefInfo] Do not use ModRefInfo result in if conditions as this makes
assumptions about the values in the enum. Replace with wrapper returning bool [NFC]. llvm-svn: 319949
This commit is contained in:
parent
5a5c1d1c69
commit
18fea013de
|
@ -544,7 +544,7 @@ bool AAResults::canInstructionRangeModRef(const Instruction &I1,
|
|||
++E; // Convert from inclusive to exclusive range.
|
||||
|
||||
for (; I != E; ++I) // Check every instruction in range
|
||||
if (intersectModRef(getModRefInfo(&*I, Loc), Mode))
|
||||
if (isModOrRefSet(intersectModRef(getModRefInfo(&*I, Loc), Mode)))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1929,7 +1929,8 @@ mayLoopAccessLocation(Value *Ptr, ModRefInfo Access, Loop *L,
|
|||
for (auto *B : L->blocks())
|
||||
for (auto &I : *B)
|
||||
if (Ignored.count(&I) == 0 &&
|
||||
intersectModRef(AA.getModRefInfo(&I, StoreLoc), Access))
|
||||
isModOrRefSet(
|
||||
intersectModRef(AA.getModRefInfo(&I, StoreLoc), Access)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -788,7 +788,8 @@ mayLoopAccessLocation(Value *Ptr, ModRefInfo Access, Loop *L,
|
|||
++BI)
|
||||
for (Instruction &I : **BI)
|
||||
if (IgnoredStores.count(&I) == 0 &&
|
||||
intersectModRef(AA.getModRefInfo(&I, StoreLoc), Access))
|
||||
isModOrRefSet(
|
||||
intersectModRef(AA.getModRefInfo(&I, StoreLoc), Access)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue