mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Enhance the memdep interface so that users can tell the difference between a dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases.
Patch by Xiaoyi Guo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141896 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -238,7 +238,7 @@ getCallSiteDependencyFrom(CallSite CS, bool isReadOnlyCall,
|
||||
// unknown, otherwise it is non-local.
|
||||
if (BB != &BB->getParent()->getEntryBlock())
|
||||
return MemDepResult::getNonLocal();
|
||||
return MemDepResult::getUnknown();
|
||||
return MemDepResult::getNonFuncLocal();
|
||||
}
|
||||
|
||||
/// isLoadLoadClobberIfExtendedToFullWidth - Return true if LI is a load that
|
||||
@@ -499,7 +499,7 @@ getPointerDependencyFrom(const AliasAnalysis::Location &MemLoc, bool isLoad,
|
||||
// unknown, otherwise it is non-local.
|
||||
if (BB != &BB->getParent()->getEntryBlock())
|
||||
return MemDepResult::getNonLocal();
|
||||
return MemDepResult::getUnknown();
|
||||
return MemDepResult::getNonFuncLocal();
|
||||
}
|
||||
|
||||
/// getDependency - Return the instruction on which a memory operation
|
||||
@@ -532,7 +532,7 @@ MemDepResult MemoryDependenceAnalysis::getDependency(Instruction *QueryInst) {
|
||||
if (QueryParent != &QueryParent->getParent()->getEntryBlock())
|
||||
LocalCache = MemDepResult::getNonLocal();
|
||||
else
|
||||
LocalCache = MemDepResult::getUnknown();
|
||||
LocalCache = MemDepResult::getNonFuncLocal();
|
||||
} else {
|
||||
AliasAnalysis::Location MemLoc;
|
||||
AliasAnalysis::ModRefResult MR = GetLocation(QueryInst, MemLoc, AA);
|
||||
@@ -688,7 +688,7 @@ MemoryDependenceAnalysis::getNonLocalCallDependency(CallSite QueryCS) {
|
||||
// a clobber, otherwise it is unknown.
|
||||
Dep = MemDepResult::getNonLocal();
|
||||
} else {
|
||||
Dep = MemDepResult::getUnknown();
|
||||
Dep = MemDepResult::getNonFuncLocal();
|
||||
}
|
||||
|
||||
// If we had a dirty entry for the block, update it. Otherwise, just add
|
||||
@@ -806,7 +806,7 @@ GetNonLocalInfoForBlock(const AliasAnalysis::Location &Loc,
|
||||
// If the block has a dependency (i.e. it isn't completely transparent to
|
||||
// the value), remember the reverse association because we just added it
|
||||
// to Cache!
|
||||
if (Dep.isNonLocal() || Dep.isUnknown())
|
||||
if (!Dep.isDef() && !Dep.isClobber())
|
||||
return Dep;
|
||||
|
||||
// Keep the ReverseNonLocalPtrDeps map up to date so we can efficiently
|
||||
|
||||
Reference in New Issue
Block a user