Fix spelling and grammar in a comment.
[oota-llvm.git] / lib / Analysis / AliasAnalysis.cpp
index fe3f41a9ce8fd814b9e3140abb4534ff313b2dd0..c8c43a69ef743bb841505fa9e825da66c490498d 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -34,9 +34,7 @@
 using namespace llvm;
 
 // Register the AliasAnalysis interface, providing a nice name to refer to.
-namespace {
-  RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis");
-}
+static RegisterAnalysisGroup<AliasAnalysis> Z("Alias Analysis");
 char AliasAnalysis::ID = 0;
 
 //===----------------------------------------------------------------------===//
@@ -116,17 +114,13 @@ AliasAnalysis::getModRefInfo(StoreInst *S, Value *P, unsigned Size) {
 AliasAnalysis::ModRefBehavior
 AliasAnalysis::getModRefBehavior(CallSite CS,
                                  std::vector<PointerAccessInfo> *Info) {
-  if (CS.doesNotAccessMemory() &&
-      // FIXME: workaround gcc bootstrap breakage
-      CS.getCalledFunction() && CS.getCalledFunction()->isDeclaration())
+  if (CS.doesNotAccessMemory())
     // Can't do better than this.
     return DoesNotAccessMemory;
   ModRefBehavior MRB = UnknownModRefBehavior;
   if (Function *F = CS.getCalledFunction())
     MRB = getModRefBehavior(F, CS, Info);
-  if (MRB != DoesNotAccessMemory && CS.onlyReadsMemory() &&
-      // FIXME: workaround gcc bootstrap breakage
-      CS.getCalledFunction() && CS.getCalledFunction()->isDeclaration())
+  if (MRB != DoesNotAccessMemory && CS.onlyReadsMemory())
     return OnlyReadsMemory;
   return MRB;
 }
@@ -134,15 +128,11 @@ AliasAnalysis::getModRefBehavior(CallSite CS,
 AliasAnalysis::ModRefBehavior
 AliasAnalysis::getModRefBehavior(Function *F,
                                  std::vector<PointerAccessInfo> *Info) {
-  if (F->doesNotAccessMemory() &&
-      // FIXME: workaround gcc bootstrap breakage
-      F->isDeclaration())
+  if (F->doesNotAccessMemory())
     // Can't do better than this.
     return DoesNotAccessMemory;
   ModRefBehavior MRB = getModRefBehavior(F, CallSite(), Info);
-  if (MRB != DoesNotAccessMemory && F->onlyReadsMemory() &&
-      // FIXME: workaround gcc bootstrap breakage
-      F->isDeclaration())
+  if (MRB != DoesNotAccessMemory && F->onlyReadsMemory())
     return OnlyReadsMemory;
   return MRB;
 }
@@ -173,7 +163,7 @@ AliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
 //
 AliasAnalysis::~AliasAnalysis() {}
 
-/// setTargetData - Subclasses must call this method to initialize the
+/// InitializeAliasAnalysis - Subclasses must call this method to initialize the
 /// AliasAnalysis interface before any other methods are called.
 ///
 void AliasAnalysis::InitializeAliasAnalysis(Pass *P) {