mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 05:29:23 +00:00
[PM] Simplify how we use the registry by including it only once. Still
more verbose than I'd like, but the code really isn't that interesting, and this still seems vastly simpler than any other solutions I've come up with. =] Maybe if we get to the 10th IR unit, this will be a problem in practice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225245 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e16c86e524
commit
7e6723e356
@ -104,9 +104,6 @@ void llvm::registerFunctionAnalyses(FunctionAnalysisManager &FAM) {
|
||||
|
||||
static bool isModulePassName(StringRef Name) {
|
||||
#define MODULE_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
|
||||
#include "PassRegistry.def"
|
||||
|
||||
// We also support building a require pass around any analysis.
|
||||
#define MODULE_ANALYSIS(NAME, CREATE_PASS) \
|
||||
if (Name == "require<" NAME ">") \
|
||||
return true;
|
||||
@ -117,9 +114,6 @@ static bool isModulePassName(StringRef Name) {
|
||||
|
||||
static bool isCGSCCPassName(StringRef Name) {
|
||||
#define CGSCC_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
|
||||
#include "PassRegistry.def"
|
||||
|
||||
// We also support building a require pass around any analysis.
|
||||
#define CGSCC_ANALYSIS(NAME, CREATE_PASS) \
|
||||
if (Name == "require<" NAME ">") \
|
||||
return true;
|
||||
@ -130,9 +124,6 @@ static bool isCGSCCPassName(StringRef Name) {
|
||||
|
||||
static bool isFunctionPassName(StringRef Name) {
|
||||
#define FUNCTION_PASS(NAME, CREATE_PASS) if (Name == NAME) return true;
|
||||
#include "PassRegistry.def"
|
||||
|
||||
// We also support building a require pass around any analysis.
|
||||
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) \
|
||||
if (Name == "require<" NAME ">") \
|
||||
return true;
|
||||
@ -147,9 +138,6 @@ static bool parseModulePassName(ModulePassManager &MPM, StringRef Name) {
|
||||
MPM.addPass(CREATE_PASS); \
|
||||
return true; \
|
||||
}
|
||||
#include "PassRegistry.def"
|
||||
|
||||
// We also support building a require pass around any analysis.
|
||||
#define MODULE_ANALYSIS(NAME, CREATE_PASS) \
|
||||
if (Name == "require<" NAME ">") { \
|
||||
MPM.addPass(NoopAnalysisRequirementPass<decltype(CREATE_PASS)>()); \
|
||||
@ -166,9 +154,6 @@ static bool parseCGSCCPassName(CGSCCPassManager &CGPM, StringRef Name) {
|
||||
CGPM.addPass(CREATE_PASS); \
|
||||
return true; \
|
||||
}
|
||||
#include "PassRegistry.def"
|
||||
|
||||
// We also support building a require pass around any analysis.
|
||||
#define CGSCC_ANALYSIS(NAME, CREATE_PASS) \
|
||||
if (Name == "require<" NAME ">") { \
|
||||
CGPM.addPass(NoopAnalysisRequirementPass<decltype(CREATE_PASS)>()); \
|
||||
@ -185,9 +170,6 @@ static bool parseFunctionPassName(FunctionPassManager &FPM, StringRef Name) {
|
||||
FPM.addPass(CREATE_PASS); \
|
||||
return true; \
|
||||
}
|
||||
#include "PassRegistry.def"
|
||||
|
||||
// We also support building a require pass around any analysis.
|
||||
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS) \
|
||||
if (Name == "require<" NAME ">") { \
|
||||
FPM.addPass(NoopAnalysisRequirementPass<decltype(CREATE_PASS)>()); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user