mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Hoist simpler checks above llvm::PointerMayBeCaptured. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b3fa322b8
commit
774394c68a
@ -386,15 +386,17 @@ MemoryDependenceAnalysis::getModRefInfo(const Instruction *Inst,
|
||||
// with a smarter AA in place, this test is just wasting compile time.
|
||||
if (!DT) return AliasAnalysis::ModRef;
|
||||
const Value *Object = GetUnderlyingObject(MemLoc.Ptr, TD);
|
||||
if (!isIdentifiedObject(Object) || isa<GlobalValue>(Object))
|
||||
if (!isIdentifiedObject(Object) || isa<GlobalValue>(Object) ||
|
||||
isa<Constant>(Object))
|
||||
return AliasAnalysis::ModRef;
|
||||
|
||||
ImmutableCallSite CS(Inst);
|
||||
if (!CS.getInstruction()) return AliasAnalysis::ModRef;
|
||||
if (!CS.getInstruction() || CS.getInstruction() == Object)
|
||||
return AliasAnalysis::ModRef;
|
||||
|
||||
CapturesBefore CB(Inst, DT);
|
||||
llvm::PointerMayBeCaptured(Object, &CB);
|
||||
|
||||
if (isa<Constant>(Object) || CS.getInstruction() == Object || CB.Captured)
|
||||
if (CB.Captured)
|
||||
return AliasAnalysis::ModRef;
|
||||
|
||||
unsigned ArgNo = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user