mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
Remove PointerAccessInfo, which nothing was using.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7cf8fc7a45
commit
a41af344c2
@ -164,27 +164,12 @@ public:
|
|||||||
UnknownModRefBehavior
|
UnknownModRefBehavior
|
||||||
};
|
};
|
||||||
|
|
||||||
/// PointerAccessInfo - This struct is used to return results for pointers,
|
|
||||||
/// globals, and the return value of a function.
|
|
||||||
struct PointerAccessInfo {
|
|
||||||
/// V - The value this record corresponds to. This may be an Argument for
|
|
||||||
/// the function, a GlobalVariable, or null, corresponding to the return
|
|
||||||
/// value for the function.
|
|
||||||
Value *V;
|
|
||||||
|
|
||||||
/// ModRefInfo - Whether the pointer is loaded or stored to/from.
|
|
||||||
///
|
|
||||||
ModRefResult ModRefInfo;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// getModRefBehavior - Return the behavior when calling the given call site.
|
/// getModRefBehavior - Return the behavior when calling the given call site.
|
||||||
virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS,
|
virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS);
|
||||||
std::vector<PointerAccessInfo> *Info = 0);
|
|
||||||
|
|
||||||
/// getModRefBehavior - Return the behavior when calling the given function.
|
/// getModRefBehavior - Return the behavior when calling the given function.
|
||||||
/// For use when the call site is not known.
|
/// For use when the call site is not known.
|
||||||
virtual ModRefBehavior getModRefBehavior(const Function *F,
|
virtual ModRefBehavior getModRefBehavior(const Function *F);
|
||||||
std::vector<PointerAccessInfo> *Info = 0);
|
|
||||||
|
|
||||||
/// getIntrinsicModRefBehavior - Return the modref behavior of the intrinsic
|
/// getIntrinsicModRefBehavior - Return the modref behavior of the intrinsic
|
||||||
/// with the given id.
|
/// with the given id.
|
||||||
|
@ -113,20 +113,18 @@ AliasAnalysis::getModRefInfo(const StoreInst *S, const Value *P, unsigned Size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AliasAnalysis::ModRefBehavior
|
AliasAnalysis::ModRefBehavior
|
||||||
AliasAnalysis::getModRefBehavior(ImmutableCallSite CS,
|
AliasAnalysis::getModRefBehavior(ImmutableCallSite CS) {
|
||||||
std::vector<PointerAccessInfo> *Info) {
|
|
||||||
if (CS.doesNotAccessMemory())
|
if (CS.doesNotAccessMemory())
|
||||||
// Can't do better than this.
|
// Can't do better than this.
|
||||||
return DoesNotAccessMemory;
|
return DoesNotAccessMemory;
|
||||||
ModRefBehavior MRB = getModRefBehavior(CS.getCalledFunction(), Info);
|
ModRefBehavior MRB = getModRefBehavior(CS.getCalledFunction());
|
||||||
if (MRB != DoesNotAccessMemory && CS.onlyReadsMemory())
|
if (MRB != DoesNotAccessMemory && CS.onlyReadsMemory())
|
||||||
return OnlyReadsMemory;
|
return OnlyReadsMemory;
|
||||||
return MRB;
|
return MRB;
|
||||||
}
|
}
|
||||||
|
|
||||||
AliasAnalysis::ModRefBehavior
|
AliasAnalysis::ModRefBehavior
|
||||||
AliasAnalysis::getModRefBehavior(const Function *F,
|
AliasAnalysis::getModRefBehavior(const Function *F) {
|
||||||
std::vector<PointerAccessInfo> *Info) {
|
|
||||||
if (F) {
|
if (F) {
|
||||||
if (F->doesNotAccessMemory())
|
if (F->doesNotAccessMemory())
|
||||||
// Can't do better than this.
|
// Can't do better than this.
|
||||||
|
@ -118,31 +118,29 @@ namespace {
|
|||||||
/// getModRefBehavior - Return the behavior of the specified function if
|
/// getModRefBehavior - Return the behavior of the specified function if
|
||||||
/// called from the specified call site. The call site may be null in which
|
/// called from the specified call site. The call site may be null in which
|
||||||
/// case the most generic behavior of this function should be returned.
|
/// case the most generic behavior of this function should be returned.
|
||||||
ModRefBehavior getModRefBehavior(const Function *F,
|
ModRefBehavior getModRefBehavior(const Function *F) {
|
||||||
std::vector<PointerAccessInfo> *Info) {
|
|
||||||
if (FunctionRecord *FR = getFunctionInfo(F)) {
|
if (FunctionRecord *FR = getFunctionInfo(F)) {
|
||||||
if (FR->FunctionEffect == 0)
|
if (FR->FunctionEffect == 0)
|
||||||
return DoesNotAccessMemory;
|
return DoesNotAccessMemory;
|
||||||
else if ((FR->FunctionEffect & Mod) == 0)
|
else if ((FR->FunctionEffect & Mod) == 0)
|
||||||
return OnlyReadsMemory;
|
return OnlyReadsMemory;
|
||||||
}
|
}
|
||||||
return AliasAnalysis::getModRefBehavior(F, Info);
|
return AliasAnalysis::getModRefBehavior(F);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getModRefBehavior - Return the behavior of the specified function if
|
/// getModRefBehavior - Return the behavior of the specified function if
|
||||||
/// called from the specified call site. The call site may be null in which
|
/// called from the specified call site. The call site may be null in which
|
||||||
/// case the most generic behavior of this function should be returned.
|
/// case the most generic behavior of this function should be returned.
|
||||||
ModRefBehavior getModRefBehavior(ImmutableCallSite CS,
|
ModRefBehavior getModRefBehavior(ImmutableCallSite CS) {
|
||||||
std::vector<PointerAccessInfo> *Info) {
|
|
||||||
const Function* F = CS.getCalledFunction();
|
const Function* F = CS.getCalledFunction();
|
||||||
if (!F) return AliasAnalysis::getModRefBehavior(CS, Info);
|
if (!F) return AliasAnalysis::getModRefBehavior(CS);
|
||||||
if (FunctionRecord *FR = getFunctionInfo(F)) {
|
if (FunctionRecord *FR = getFunctionInfo(F)) {
|
||||||
if (FR->FunctionEffect == 0)
|
if (FR->FunctionEffect == 0)
|
||||||
return DoesNotAccessMemory;
|
return DoesNotAccessMemory;
|
||||||
else if ((FR->FunctionEffect & Mod) == 0)
|
else if ((FR->FunctionEffect & Mod) == 0)
|
||||||
return OnlyReadsMemory;
|
return OnlyReadsMemory;
|
||||||
}
|
}
|
||||||
return AliasAnalysis::getModRefBehavior(CS, Info);
|
return AliasAnalysis::getModRefBehavior(CS);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void deleteValue(Value *V);
|
virtual void deleteValue(Value *V);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user