[llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysis.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 26 13:58:01 PST 2003
Changes in directory llvm/lib/Analysis:
AliasAnalysis.cpp updated: 1.12 -> 1.13
---
Log message:
Add new -no-aa implementation
---
Diffs of the changes:
Index: llvm/lib/Analysis/AliasAnalysis.cpp
diff -u llvm/lib/Analysis/AliasAnalysis.cpp:1.12 llvm/lib/Analysis/AliasAnalysis.cpp:1.13
--- llvm/lib/Analysis/AliasAnalysis.cpp:1.12 Wed Feb 26 13:41:54 2003
+++ llvm/lib/Analysis/AliasAnalysis.cpp Wed Feb 26 13:57:10 2003
@@ -97,3 +97,22 @@
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
More information about the llvm-commits
mailing list