[llvm] r260838 - [PM/AA] Wire BasicAA's new pass manager class up to the pass registry.
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 13 15:46:24 PST 2016
Author: chandlerc
Date: Sat Feb 13 17:46:24 2016
New Revision: 260838
URL: http://llvm.org/viewvc/llvm-project?rev=260838&view=rev
Log:
[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.
Modified:
llvm/trunk/include/llvm/Analysis/BasicAliasAnalysis.h
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/lib/Passes/PassRegistry.def
llvm/trunk/test/Other/new-pass-manager.ll
Modified: llvm/trunk/include/llvm/Analysis/BasicAliasAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/BasicAliasAnalysis.h?rev=260838&r1=260837&r2=260838&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/BasicAliasAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/BasicAliasAnalysis.h Sat Feb 13 17:46:24 2016
@@ -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;
Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=260838&r1=260837&r2=260838&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Sat Feb 13 17:46:24 2016
@@ -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"
Modified: llvm/trunk/lib/Passes/PassRegistry.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassRegistry.def?rev=260838&r1=260837&r2=260838&view=diff
==============================================================================
--- llvm/trunk/lib/Passes/PassRegistry.def (original)
+++ llvm/trunk/lib/Passes/PassRegistry.def Sat Feb 13 17:46:24 2016
@@ -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())
Modified: llvm/trunk/test/Other/new-pass-manager.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pass-manager.ll?rev=260838&r1=260837&r2=260838&view=diff
==============================================================================
--- llvm/trunk/test/Other/new-pass-manager.ll (original)
+++ llvm/trunk/test/Other/new-pass-manager.ll Sat Feb 13 17:46:24 2016
@@ -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
}
More information about the llvm-commits
mailing list