Change the type of FnAllocState.
[oota-llvm.git] / lib / Analysis / AliasAnalysis.cpp
index 4816a67d102f8d6a487300b01651848f44fd06d5..3acdf7841da775e93cf081920427043a88de6846 100644 (file)
@@ -1,4 +1,11 @@
 //===- AliasAnalysis.cpp - Generic Alias Analysis Interface Implementation -==//
+// 
+//                     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 implements the generic AliasAnalysis interface which is used as the
 // common interface used by all clients and implementations of alias analysis.
@@ -97,3 +104,22 @@ bool AliasAnalysis::canInstructionRangeModify(const Instruction &I1,
 extern void BasicAAStub();
 static IncludeFile INCLUDE_BASICAA_CPP((void*)&BasicAAStub);
 
+
+namespace {
+  struct NoAA : public ImmutablePass, public AliasAnalysis {
+    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      AliasAnalysis::getAnalysisUsage(AU);
+    }
+    
+    virtual void initializePass() {
+      InitializeAliasAnalysis(this);
+    }
+  };
+  // Register this pass...
+  RegisterOpt<NoAA>
+  X("no-aa", "No Alias Analysis (always returns 'may' alias)");
+
+  // Declare that we implement the AliasAnalysis interface
+  RegisterAnalysisGroup<AliasAnalysis, NoAA> Y;
+}  // End of anonymous namespace