Add new -no-aa implementation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-02-26 19:57:10 +00:00
parent d501c13b7d
commit 8dcd17c938

View File

@ -97,3 +97,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