mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
use AA::isMustAlias to simplify some calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -243,9 +243,8 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,
|
|||||||
// FIXME: This only considers queries directly on the invariant-tagged
|
// FIXME: This only considers queries directly on the invariant-tagged
|
||||||
// pointer, not on query pointers that are indexed off of them. It'd
|
// pointer, not on query pointers that are indexed off of them. It'd
|
||||||
// be nice to handle that at some point.
|
// be nice to handle that at some point.
|
||||||
AliasAnalysis::AliasResult R =
|
if (AA->isMustAlias(AliasAnalysis::Location(II->getArgOperand(1)),
|
||||||
AA->alias(AliasAnalysis::Location(II->getArgOperand(1)), MemLoc);
|
MemLoc))
|
||||||
if (R == AliasAnalysis::MustAlias)
|
|
||||||
return MemDepResult::getDef(II);
|
return MemDepResult::getDef(II);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -317,8 +316,7 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,
|
|||||||
(isa<CallInst>(Inst) && extractMallocCall(Inst))) {
|
(isa<CallInst>(Inst) && extractMallocCall(Inst))) {
|
||||||
const Value *AccessPtr = GetUnderlyingObject(MemLoc.Ptr, TD);
|
const Value *AccessPtr = GetUnderlyingObject(MemLoc.Ptr, TD);
|
||||||
|
|
||||||
if (AccessPtr == Inst ||
|
if (AccessPtr == Inst || AA->isMustAlias(Inst, AccessPtr))
|
||||||
AA->alias(Inst, 1, AccessPtr, 1) == AliasAnalysis::MustAlias)
|
|
||||||
return MemDepResult::getDef(Inst);
|
return MemDepResult::getDef(Inst);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user