Remove attribution from file headers, per discussion on llvmdev.
[oota-llvm.git] / lib / Analysis / IPA / GlobalsModRef.cpp
index 8d41751b88d5b8712166544e6b4f20b4b2fa9522..880298ec020d62bed1826716d36069d80004aa11 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.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -83,6 +83,9 @@ namespace {
     std::map<Function*, FunctionRecord> FunctionInfo;
 
   public:
+    static char ID;
+    GlobalsModRef() : ModulePass((intptr_t)&ID) {}
+
     bool runOnModule(Module &M) {
       InitializeAliasAnalysis(this);                 // set up super class
       AnalyzeGlobals(M);                          // find non-addr taken globals
@@ -143,6 +146,7 @@ namespace {
     bool AnalyzeIndirectGlobalMemory(GlobalValue *GV);
   };
 
+  char GlobalsModRef::ID = 0;
   RegisterPass<GlobalsModRef> X("globalsmodref-aa",
                                 "Simple mod/ref analysis for globals");
   RegisterAnalysisGroup<AliasAnalysis> Y(X);
@@ -390,7 +394,7 @@ void GlobalsModRef::AnalyzeSCC(std::vector<CallGraphNode *> &SCC) {
           // Okay, if we can't say anything about it, maybe some other alias
           // analysis can.
           ModRefBehavior MRB =
-            AliasAnalysis::getModRefBehavior(Callee, CallSite());
+            AliasAnalysis::getModRefBehavior(Callee);
           if (MRB != DoesNotAccessMemory) {
             // FIXME: could make this more aggressive for functions that just
             // read memory.  We should just say they read all globals.
@@ -544,7 +548,10 @@ void GlobalsModRef::deleteValue(Value *V) {
   // Otherwise, if this is an allocation related to an indirect global, remove
   // it.
   AllocsForIndirectGlobals.erase(V);
+  
+  AliasAnalysis::deleteValue(V);
 }
 
 void GlobalsModRef::copyValue(Value *From, Value *To) {
+  AliasAnalysis::copyValue(From, To);
 }