[PM] Give slightly less horrible names to the utility pass templates for

requiring and invalidating specific analyses. Also make their printed
names match their class names. Writing these out as prose really doesn't
make sense to me any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225346 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2015-01-07 11:14:51 +00:00
parent 76bdb26595
commit 7372d445af
3 changed files with 33 additions and 33 deletions

View File

@ -781,7 +781,7 @@ createModuleToFunctionPassAdaptor(FunctionPassT Pass) {
///
/// This is a no-op pass which simply forces a specific analysis pass's result
/// to be available when it is run.
template <typename AnalysisT> struct NoopAnalysisRequirementPass {
template <typename AnalysisT> struct RequireAnalysisPass {
/// \brief Run this pass over some unit of IR.
///
/// This pass can be run over any unit of IR and use any analysis manager
@ -796,7 +796,7 @@ template <typename AnalysisT> struct NoopAnalysisRequirementPass {
return PreservedAnalyses::all();
}
static StringRef name() { return "No-op Analysis Requirement Pass"; }
static StringRef name() { return "RequireAnalysisPass"; }
};
/// \brief A template utility pass to force an analysis result to be
@ -804,7 +804,7 @@ template <typename AnalysisT> struct NoopAnalysisRequirementPass {
///
/// This is a no-op pass which simply forces a specific analysis result to be
/// invalidated when it is run.
template <typename AnalysisT> struct NoopAnalysisInvalidationPass {
template <typename AnalysisT> struct InvalidateAnalysisPass {
/// \brief Run this pass over some unit of IR.
///
/// This pass can be run over any unit of IR and use any analysis manager
@ -821,7 +821,7 @@ template <typename AnalysisT> struct NoopAnalysisInvalidationPass {
return PreservedAnalyses::all();
}
static StringRef name() { return "No-op Analysis Invalidation Pass"; }
static StringRef name() { return "InvalidateAnalysisPass"; }
};
/// \brief A utility pass that does nothing but preserves no analyses.

View File

@ -126,13 +126,13 @@
; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES
; CHECK-ANALYSES: Starting module pass manager
; CHECK-ANALYSES: Running module pass: No-op Analysis Requirement Pass
; CHECK-ANALYSES: Running module pass: RequireAnalysisPass
; CHECK-ANALYSES: Running module analysis: NoOpModuleAnalysis
; CHECK-ANALYSES: Starting CGSCC pass manager
; CHECK-ANALYSES: Running CGSCC pass: No-op Analysis Requirement Pass
; CHECK-ANALYSES: Running CGSCC pass: RequireAnalysisPass
; CHECK-ANALYSES: Running CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-ANALYSES: Starting function pass manager
; CHECK-ANALYSES: Running function pass: No-op Analysis Requirement Pass
; CHECK-ANALYSES: Running function pass: RequireAnalysisPass
; CHECK-ANALYSES: Running function analysis: NoOpFunctionAnalysis
; Make sure no-op passes that preserve all analyses don't even try to do any
@ -147,7 +147,7 @@
; RUN: -passes='require<no-op-module>,require<no-op-module>,require<no-op-module>' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting module pass manager
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running module pass: No-op Analysis Requirement Pass
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running module pass: RequireAnalysisPass
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running module analysis: NoOpModuleAnalysis
; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running module analysis: NoOpModuleAnalysis
@ -155,7 +155,7 @@
; RUN: -passes='require<no-op-module>,invalidate<no-op-module>,require<no-op-module>' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting module pass manager
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running module pass: No-op Analysis Requirement Pass
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running module pass: RequireAnalysisPass
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running module analysis: NoOpModuleAnalysis
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating module analysis: NoOpModuleAnalysis
; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running module analysis: NoOpModuleAnalysis
@ -164,7 +164,7 @@
; RUN: -passes='cgscc(require<no-op-cgscc>,require<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting CGSCC pass manager
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: No-op Analysis Requirement Pass
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: RequireAnalysisPass
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running CGSCC analysis: NoOpCGSCCAnalysis
@ -172,7 +172,7 @@
; RUN: -passes='cgscc(require<no-op-cgscc>,invalidate<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting CGSCC pass manager
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: No-op Analysis Requirement Pass
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running CGSCC pass: RequireAnalysisPass
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running CGSCC analysis: NoOpCGSCCAnalysis
@ -181,7 +181,7 @@
; RUN: -passes='function(require<no-op-function>,require<no-op-function>,require<no-op-function>)' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting function pass manager
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running function pass: No-op Analysis Requirement Pass
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running function pass: RequireAnalysisPass
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running function analysis: NoOpFunctionAnalysis
; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running function analysis: NoOpFunctionAnalysis
@ -189,7 +189,7 @@
; RUN: -passes='function(require<no-op-function>,invalidate<no-op-function>,require<no-op-function>)' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting function pass manager
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running function pass: No-op Analysis Requirement Pass
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running function pass: RequireAnalysisPass
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running function analysis: NoOpFunctionAnalysis
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating function analysis: NoOpFunctionAnalysis
; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running function analysis: NoOpFunctionAnalysis
@ -198,30 +198,30 @@
; RUN: -passes='require<no-op-module>,module(require<no-op-module>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-module>),require<no-op-module>' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL
; CHECK-INVALIDATE-ALL: Starting module pass manager run.
; CHECK-INVALIDATE-ALL: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL: Starting module pass manager run.
; CHECK-INVALIDATE-ALL: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-NOT: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL: Starting function pass manager run.
; CHECK-INVALIDATE-ALL: Running function pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL: Running function pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL: Running function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL: Running function pass: InvalidateAllAnalysesPass
; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses for function
; CHECK-INVALIDATE-ALL: Invalidating function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL: Running function pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL: Running function pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL: Running function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL: Finished function pass manager run.
; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses for function
; CHECK-INVALIDATE-ALL-NOT: Running function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses for module
; CHECK-INVALIDATE-ALL: Invalidating module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL: Finished module pass manager run.
; CHECK-INVALIDATE-ALL: Invalidating all non-preserved analyses for module
; CHECK-INVALIDATE-ALL-NOT: Invalidating module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-NOT: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL: Finished module pass manager run.
@ -229,40 +229,40 @@
; RUN: -passes='require<no-op-module>,module(require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-cgscc>),require<no-op-module>),require<no-op-module>' %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG
; CHECK-INVALIDATE-ALL-CG: Starting module pass manager run.
; CHECK-INVALIDATE-ALL-CG: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL-CG: Starting module pass manager run.
; CHECK-INVALIDATE-ALL-CG: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG-NOT: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL-CG: Starting CGSCC pass manager run.
; CHECK-INVALIDATE-ALL-CG: Running CGSCC pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running CGSCC pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG: Running CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-INVALIDATE-ALL-CG: Starting function pass manager run.
; CHECK-INVALIDATE-ALL-CG: Running function pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running function pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG: Running function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL-CG: Running function pass: InvalidateAllAnalysesPass
; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses for function
; CHECK-INVALIDATE-ALL-CG: Invalidating function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL-CG: Running function pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running function pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG: Running function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL-CG: Finished function pass manager run.
; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses for function
; CHECK-INVALIDATE-ALL-CG-NOT: Running function analysis: NoOpFunctionAnalysis
; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses for SCC
; CHECK-INVALIDATE-ALL-CG: Invalidating CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-INVALIDATE-ALL-CG: Running CGSCC pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running CGSCC pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG: Running CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-INVALIDATE-ALL-CG: Finished CGSCC pass manager run.
; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses for SCC
; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating CGSCC analysis: NoOpCGSCCAnalysis
; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses for module
; CHECK-INVALIDATE-ALL-CG: Invalidating module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL-CG: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL-CG: Finished module pass manager run.
; CHECK-INVALIDATE-ALL-CG: Invalidating all non-preserved analyses for module
; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL-CG: Running module pass: No-op Analysis Requirement Pass
; CHECK-INVALIDATE-ALL-CG: Running module pass: RequireAnalysisPass
; CHECK-INVALIDATE-ALL-CG-NOT: Running module analysis: NoOpModuleAnalysis
; CHECK-INVALIDATE-ALL-CG: Finished module pass manager run.

View File

@ -142,11 +142,11 @@ static bool parseModulePassName(ModulePassManager &MPM, StringRef Name) {
}
#define MODULE_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">") { \
MPM.addPass(NoopAnalysisRequirementPass<decltype(CREATE_PASS)>()); \
MPM.addPass(RequireAnalysisPass<decltype(CREATE_PASS)>()); \
return true; \
} \
if (Name == "invalidate<" NAME ">") { \
MPM.addPass(NoopAnalysisInvalidationPass<decltype(CREATE_PASS)>()); \
MPM.addPass(InvalidateAnalysisPass<decltype(CREATE_PASS)>()); \
return true; \
}
#include "PassRegistry.def"
@ -162,11 +162,11 @@ static bool parseCGSCCPassName(CGSCCPassManager &CGPM, StringRef Name) {
}
#define CGSCC_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">") { \
CGPM.addPass(NoopAnalysisRequirementPass<decltype(CREATE_PASS)>()); \
CGPM.addPass(RequireAnalysisPass<decltype(CREATE_PASS)>()); \
return true; \
} \
if (Name == "invalidate<" NAME ">") { \
CGPM.addPass(NoopAnalysisInvalidationPass<decltype(CREATE_PASS)>()); \
CGPM.addPass(InvalidateAnalysisPass<decltype(CREATE_PASS)>()); \
return true; \
}
#include "PassRegistry.def"
@ -182,11 +182,11 @@ static bool parseFunctionPassName(FunctionPassManager &FPM, StringRef Name) {
}
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">") { \
FPM.addPass(NoopAnalysisRequirementPass<decltype(CREATE_PASS)>()); \
FPM.addPass(RequireAnalysisPass<decltype(CREATE_PASS)>()); \
return true; \
} \
if (Name == "invalidate<" NAME ">") { \
FPM.addPass(NoopAnalysisInvalidationPass<decltype(CREATE_PASS)>()); \
FPM.addPass(InvalidateAnalysisPass<decltype(CREATE_PASS)>()); \
return true; \
}
#include "PassRegistry.def"