[PM/AA] Wire BasicAA's new pass manager class up to the pass registry.

This ensures that all of the various pieces are working. The next patch
will wire up commandline-driven alias analysis chain building and allow
BasicAA to work with the AAManager.

llvm-svn: 260838
This commit is contained in:
Chandler Carruth 2016-02-13 23:46:24 +00:00
parent 5b879982a7
commit 83293a2122
4 changed files with 13 additions and 3 deletions

View File

@ -185,10 +185,10 @@ public:
/// \brief Opaque, unique identifier for this analysis pass.
static void *ID() { return (void *)&PassID; }
BasicAAResult run(Function &F, AnalysisManager<Function> *AM);
/// \brief Provide access to a name for this pass for debugging purposes.
static StringRef name() { return "BasicAliasAnalysis"; }
static StringRef name() { return "BasicAA"; }
BasicAAResult run(Function &F, AnalysisManager<Function> *AM);
private:
static char PassID;

View File

@ -18,6 +18,7 @@
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/BasicAliasAnalysis.h"
#include "llvm/Analysis/CGSCCPassManager.h"
#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/Analysis/LoopInfo.h"

View File

@ -55,6 +55,7 @@ CGSCC_PASS("no-op-cgscc", NoOpCGSCCPass())
#endif
FUNCTION_ANALYSIS("aa", AAManager())
FUNCTION_ANALYSIS("assumptions", AssumptionAnalysis())
FUNCTION_ANALYSIS("basic-aa", BasicAA())
FUNCTION_ANALYSIS("domtree", DominatorTreeAnalysis())
FUNCTION_ANALYSIS("loops", LoopAnalysis())
FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())

View File

@ -306,6 +306,14 @@
; CHECK-AA: Running analysis: AAManager
; CHECK-AA: Finished pass manager
; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \
; RUN: -passes='require<basic-aa>' \
; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA
; CHECK-BASIC-AA: Starting pass manager
; CHECK-BASIC-AA: Running pass: RequireAnalysisPass
; CHECK-BASIC-AA: Running analysis: BasicAA
; CHECK-BASIC-AA: Finished pass manager
define void @foo() {
ret void
}