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 | 88874ec60a0a761a5462c660821749c7910c3526 (patch) | |
| tree | 2183c32b6e8b8f45339e609b933272a58a834690 /llvm/lib/Analysis | |
| parent | f540ae5ab32303919ca2b259c8ff8fb301225c42 (diff) | |
| download | bcm5719-llvm-88874ec60a0a761a5462c660821749c7910c3526.tar.gz bcm5719-llvm-88874ec60a0a761a5462c660821749c7910c3526.zip  | |
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.
llvm-svn: 89599
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/AliasAnalysis.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/Analysis/AliasDebugger.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Analysis/AliasSetTracker.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/Analysis/IPA/Andersens.cpp | 27 | ||||
| -rw-r--r-- | llvm/lib/Analysis/IPA/GlobalsModRef.cpp | 1 | 
6 files changed, 0 insertions, 55 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp index 0234965a006..92fa1df5c95 100644 --- a/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/llvm/lib/Analysis/AliasAnalysis.cpp @@ -49,21 +49,11 @@ AliasAnalysis::alias(const Value *V1, unsigned V1Size,    return AA->alias(V1, V1Size, V2, V2Size);  } -void AliasAnalysis::getMustAliases(Value *P, std::vector<Value*> &RetVals) { -  assert(AA && "AA didn't call InitializeAliasAnalysis in its run method!"); -  return AA->getMustAliases(P, RetVals); -} -  bool AliasAnalysis::pointsToConstantMemory(const Value *P) {    assert(AA && "AA didn't call InitializeAliasAnalysis in its run method!");    return AA->pointsToConstantMemory(P);  } -bool AliasAnalysis::hasNoModRefInfoForCalls() const { -  assert(AA && "AA didn't call InitializeAliasAnalysis in its run method!"); -  return AA->hasNoModRefInfoForCalls(); -} -  void AliasAnalysis::deleteValue(Value *V) {    assert(AA && "AA didn't call InitializeAliasAnalysis in its run method!");    AA->deleteValue(V); diff --git a/llvm/lib/Analysis/AliasDebugger.cpp b/llvm/lib/Analysis/AliasDebugger.cpp index cf4727f1ebe..6868e3f2cef 100644 --- a/llvm/lib/Analysis/AliasDebugger.cpp +++ b/llvm/lib/Analysis/AliasDebugger.cpp @@ -90,11 +90,6 @@ namespace {        return AliasAnalysis::getModRefInfo(CS1,CS2);      } -    void getMustAliases(Value *P, std::vector<Value*> &RetVals) { -      assert(Vals.find(P) != Vals.end() && "Never seen value in AA before"); -      return AliasAnalysis::getMustAliases(P, RetVals); -    } -      bool pointsToConstantMemory(const Value *P) {        assert(Vals.find(P) != Vals.end() && "Never seen value in AA before");        return AliasAnalysis::pointsToConstantMemory(P); diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index c037c8d63af..66346003739 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/lib/Analysis/AliasSetTracker.cpp @@ -153,9 +153,6 @@ bool AliasSet::aliasesPointer(const Value *Ptr, unsigned Size,    // Check the call sites list and invoke list...    if (!CallSites.empty()) { -    if (AA.hasNoModRefInfoForCalls()) -      return true; -      for (unsigned i = 0, e = CallSites.size(); i != e; ++i)        if (AA.getModRefInfo(CallSites[i], const_cast<Value*>(Ptr), Size)                     != AliasAnalysis::NoModRef) @@ -169,9 +166,6 @@ bool AliasSet::aliasesCallSite(CallSite CS, AliasAnalysis &AA) const {    if (AA.doesNotAccessMemory(CS))      return false; -  if (AA.hasNoModRefInfoForCalls()) -    return true; -    for (unsigned i = 0, e = CallSites.size(); i != e; ++i)      if (AA.getModRefInfo(CallSites[i], CS) != AliasAnalysis::NoModRef ||          AA.getModRefInfo(CS, CallSites[i]) != AliasAnalysis::NoModRef) diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index 66bb4397c3a..5dbdfe1747d 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -164,7 +164,6 @@ namespace {        llvm_unreachable("This method may not be called on this function!");      } -    virtual void getMustAliases(Value *P, std::vector<Value*> &RetVals) { }      virtual bool pointsToConstantMemory(const Value *P) { return false; }      virtual ModRefResult getModRefInfo(CallSite CS, Value *P, unsigned Size) {        return ModRef; @@ -172,7 +171,6 @@ namespace {      virtual ModRefResult getModRefInfo(CallSite CS1, CallSite CS2) {        return ModRef;      } -    virtual bool hasNoModRefInfoForCalls() const { return true; }      virtual void deleteValue(Value *V) {}      virtual void copyValue(Value *From, Value *To) {} @@ -211,10 +209,6 @@ namespace {      ModRefResult getModRefInfo(CallSite CS, Value *P, unsigned Size);      ModRefResult getModRefInfo(CallSite CS1, CallSite CS2); -    /// hasNoModRefInfoForCalls - We can provide mod/ref information against -    /// non-escaping allocations. -    virtual bool hasNoModRefInfoForCalls() const { return false; } -      /// pointsToConstantMemory - Chase pointers until we find a (constant      /// global) or not.      bool pointsToConstantMemory(const Value *P); diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index 40a8cd5b23e..e12db817440 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/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, diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp index ddd6ff9bd82..a979a99a4de 100644 --- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp @@ -111,7 +111,6 @@ namespace {      ModRefResult getModRefInfo(CallSite CS1, CallSite CS2) {        return AliasAnalysis::getModRefInfo(CS1,CS2);      } -    bool hasNoModRefInfoForCalls() const { return false; }      /// getModRefBehavior - Return the behavior of the specified function if      /// called from the specified call site.  The call site may be null in which  | 

