diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-22 16:01:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-22 16:01:44 +0000 |
commit | 66e08cf79a052dd75bf6fa2f94abd4c0a18cb019 (patch) | |
tree | 63df9adfd937867cb28155e1a75cb259d4868a2e /lib/Analysis/IPA/Andersens.cpp | |
parent | 18d18b71d5955274b95ac96cbb8353b4766d1995 (diff) |
Remove the AliasAnalysis::getMustAliases method, which is dead.
The hasNoModRefInfoForCalls isn't worth it as a filter because
basicaa provides m/r info and everything chains to it, so remove
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/Andersens.cpp')
-rw-r--r-- | lib/Analysis/IPA/Andersens.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index 40a8cd5b23..e12db81744 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -484,7 +484,6 @@ namespace { const Value *V2, unsigned V2Size); virtual ModRefResult getModRefInfo(CallSite CS, Value *P, unsigned Size); virtual ModRefResult getModRefInfo(CallSite CS1, CallSite CS2); - void getMustAliases(Value *P, std::vector<Value*> &RetVals); bool pointsToConstantMemory(const Value *P); virtual void deleteValue(Value *V) { @@ -680,32 +679,6 @@ Andersens::getModRefInfo(CallSite CS1, CallSite CS2) { return AliasAnalysis::getModRefInfo(CS1,CS2); } -/// getMustAlias - We can provide must alias information if we know that a -/// pointer can only point to a specific function or the null pointer. -/// Unfortunately we cannot determine must-alias information for global -/// variables or any other memory memory objects because we do not track whether -/// a pointer points to the beginning of an object or a field of it. -void Andersens::getMustAliases(Value *P, std::vector<Value*> &RetVals) { - Node *N = &GraphNodes[FindNode(getNode(P))]; - if (N->PointsTo->count() == 1) { - Node *Pointee = &GraphNodes[N->PointsTo->find_first()]; - // If a function is the only object in the points-to set, then it must be - // the destination. Note that we can't handle global variables here, - // because we don't know if the pointer is actually pointing to a field of - // the global or to the beginning of it. - if (Value *V = Pointee->getValue()) { - if (Function *F = dyn_cast<Function>(V)) - RetVals.push_back(F); - } else { - // If the object in the points-to set is the null object, then the null - // pointer is a must alias. - if (Pointee == &GraphNodes[NullObject]) - RetVals.push_back(Constant::getNullValue(P->getType())); - } - } - AliasAnalysis::getMustAliases(P, RetVals); -} - /// pointsToConstantMemory - If we can determine that this pointer only points /// to constant memory, return true. In practice, this means that if the /// pointer can only point to constant globals, functions, or the null pointer, |