mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109045 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -84,8 +84,8 @@ namespace {
|
||||
}
|
||||
|
||||
char ArgPromotion::ID = 0;
|
||||
static RegisterPass<ArgPromotion>
|
||||
X("argpromotion", "Promote 'by reference' arguments to scalars");
|
||||
INITIALIZE_PASS(ArgPromotion, "argpromotion",
|
||||
"Promote 'by reference' arguments to scalars", false, false);
|
||||
|
||||
Pass *llvm::createArgumentPromotionPass(unsigned maxElements) {
|
||||
return new ArgPromotion(maxElements);
|
||||
|
@@ -41,8 +41,8 @@ namespace {
|
||||
}
|
||||
|
||||
char ConstantMerge::ID = 0;
|
||||
static RegisterPass<ConstantMerge>
|
||||
X("constmerge", "Merge Duplicate Global Constants");
|
||||
INITIALIZE_PASS(ConstantMerge, "constmerge",
|
||||
"Merge Duplicate Global Constants", false, false);
|
||||
|
||||
ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }
|
||||
|
||||
|
@@ -151,8 +151,7 @@ namespace {
|
||||
|
||||
|
||||
char DAE::ID = 0;
|
||||
static RegisterPass<DAE>
|
||||
X("deadargelim", "Dead Argument Elimination");
|
||||
INITIALIZE_PASS(DAE, "deadargelim", "Dead Argument Elimination", false, false);
|
||||
|
||||
namespace {
|
||||
/// DAH - DeadArgumentHacking pass - Same as dead argument elimination, but
|
||||
@@ -167,8 +166,9 @@ namespace {
|
||||
}
|
||||
|
||||
char DAH::ID = 0;
|
||||
static RegisterPass<DAH>
|
||||
Y("deadarghaX0r", "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)");
|
||||
INITIALIZE_PASS(DAH, "deadarghaX0r",
|
||||
"Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)",
|
||||
false, false);
|
||||
|
||||
/// createDeadArgEliminationPass - This pass removes arguments from functions
|
||||
/// which are not used by the body of the function.
|
||||
|
@@ -45,7 +45,7 @@ namespace {
|
||||
}
|
||||
|
||||
char DTE::ID = 0;
|
||||
static RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
|
||||
INITIALIZE_PASS(DTE, "deadtypeelim", "Dead Type Elimination", false, false);
|
||||
|
||||
ModulePass *llvm::createDeadTypeEliminationPass() {
|
||||
return new DTE();
|
||||
|
@@ -69,8 +69,8 @@ namespace {
|
||||
}
|
||||
|
||||
char FunctionAttrs::ID = 0;
|
||||
static RegisterPass<FunctionAttrs>
|
||||
X("functionattrs", "Deduce function attributes");
|
||||
INITIALIZE_PASS(FunctionAttrs, "functionattrs",
|
||||
"Deduce function attributes", false, false);
|
||||
|
||||
Pass *llvm::createFunctionAttrsPass() { return new FunctionAttrs(); }
|
||||
|
||||
|
@@ -51,7 +51,8 @@ namespace {
|
||||
}
|
||||
|
||||
char GlobalDCE::ID = 0;
|
||||
static RegisterPass<GlobalDCE> X("globaldce", "Dead Global Elimination");
|
||||
INITIALIZE_PASS(GlobalDCE, "globaldce",
|
||||
"Dead Global Elimination", false, false);
|
||||
|
||||
ModulePass *llvm::createGlobalDCEPass() { return new GlobalDCE(); }
|
||||
|
||||
|
@@ -74,7 +74,8 @@ namespace {
|
||||
}
|
||||
|
||||
char GlobalOpt::ID = 0;
|
||||
static RegisterPass<GlobalOpt> X("globalopt", "Global Variable Optimizer");
|
||||
INITIALIZE_PASS(GlobalOpt, "globalopt",
|
||||
"Global Variable Optimizer", false, false);
|
||||
|
||||
ModulePass *llvm::createGlobalOptimizerPass() { return new GlobalOpt(); }
|
||||
|
||||
|
@@ -45,8 +45,8 @@ namespace {
|
||||
}
|
||||
|
||||
char IPCP::ID = 0;
|
||||
static RegisterPass<IPCP>
|
||||
X("ipconstprop", "Interprocedural constant propagation");
|
||||
INITIALIZE_PASS(IPCP, "ipconstprop",
|
||||
"Interprocedural constant propagation", false, false);
|
||||
|
||||
ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
|
||||
|
||||
|
@@ -61,8 +61,8 @@ namespace {
|
||||
}
|
||||
|
||||
char AlwaysInliner::ID = 0;
|
||||
static RegisterPass<AlwaysInliner>
|
||||
X("always-inline", "Inliner for always_inline functions");
|
||||
INITIALIZE_PASS(AlwaysInliner, "always-inline",
|
||||
"Inliner for always_inline functions", false, false);
|
||||
|
||||
Pass *llvm::createAlwaysInlinerPass() { return new AlwaysInliner(); }
|
||||
|
||||
|
@@ -56,8 +56,8 @@ namespace {
|
||||
}
|
||||
|
||||
char SimpleInliner::ID = 0;
|
||||
static RegisterPass<SimpleInliner>
|
||||
X("inline", "Function Integration/Inlining");
|
||||
INITIALIZE_PASS(SimpleInliner, "inline",
|
||||
"Function Integration/Inlining", false, false);
|
||||
|
||||
Pass *llvm::createFunctionInliningPass() { return new SimpleInliner(); }
|
||||
|
||||
|
@@ -63,8 +63,8 @@ namespace {
|
||||
} // end anonymous namespace
|
||||
|
||||
char InternalizePass::ID = 0;
|
||||
static RegisterPass<InternalizePass>
|
||||
X("internalize", "Internalize Global Symbols");
|
||||
INITIALIZE_PASS(InternalizePass, "internalize",
|
||||
"Internalize Global Symbols", false, false);
|
||||
|
||||
InternalizePass::InternalizePass(bool AllButMain)
|
||||
: ModulePass(&ID), AllButMain(AllButMain){
|
||||
|
@@ -50,8 +50,8 @@ namespace {
|
||||
}
|
||||
|
||||
char LoopExtractor::ID = 0;
|
||||
static RegisterPass<LoopExtractor>
|
||||
X("loop-extract", "Extract loops into new functions");
|
||||
INITIALIZE_PASS(LoopExtractor, "loop-extract",
|
||||
"Extract loops into new functions", false, false);
|
||||
|
||||
namespace {
|
||||
/// SingleLoopExtractor - For bugpoint.
|
||||
@@ -62,8 +62,8 @@ namespace {
|
||||
} // End anonymous namespace
|
||||
|
||||
char SingleLoopExtractor::ID = 0;
|
||||
static RegisterPass<SingleLoopExtractor>
|
||||
Y("loop-extract-single", "Extract at most one loop into a new function");
|
||||
INITIALIZE_PASS(SingleLoopExtractor, "loop-extract-single",
|
||||
"Extract at most one loop into a new function", false, false);
|
||||
|
||||
// createLoopExtractorPass - This pass extracts all natural loops from the
|
||||
// program into a function if it can.
|
||||
@@ -159,8 +159,9 @@ namespace {
|
||||
}
|
||||
|
||||
char BlockExtractorPass::ID = 0;
|
||||
static RegisterPass<BlockExtractorPass>
|
||||
XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)");
|
||||
INITIALIZE_PASS(BlockExtractorPass, "extract-blocks",
|
||||
"Extract Basic Blocks From Module (for bugpoint use)",
|
||||
false, false);
|
||||
|
||||
// createBlockExtractorPass - This pass extracts all blocks (except those
|
||||
// specified in the argument list) from the functions in the module.
|
||||
|
@@ -122,7 +122,7 @@ namespace {
|
||||
} // end anonymous namespace
|
||||
|
||||
char LowerSetJmp::ID = 0;
|
||||
static RegisterPass<LowerSetJmp> X("lowersetjmp", "Lower Set Jump");
|
||||
INITIALIZE_PASS(LowerSetJmp, "lowersetjmp", "Lower Set Jump", false, false);
|
||||
|
||||
// run - Run the transformation on the program. We grab the function
|
||||
// prototypes for longjmp and setjmp. If they are used in the program,
|
||||
|
@@ -111,7 +111,7 @@ namespace {
|
||||
}
|
||||
|
||||
char MergeFunctions::ID = 0;
|
||||
static RegisterPass<MergeFunctions> X("mergefunc", "Merge Functions");
|
||||
INITIALIZE_PASS(MergeFunctions, "mergefunc", "Merge Functions", false, false);
|
||||
|
||||
ModulePass *llvm::createMergeFunctionsPass() {
|
||||
return new MergeFunctions();
|
||||
|
@@ -40,7 +40,8 @@ namespace {
|
||||
}
|
||||
|
||||
char PartialInliner::ID = 0;
|
||||
static RegisterPass<PartialInliner> X("partial-inliner", "Partial Inliner");
|
||||
INITIALIZE_PASS(PartialInliner, "partial-inliner",
|
||||
"Partial Inliner", false, false);
|
||||
|
||||
ModulePass* llvm::createPartialInliningPass() { return new PartialInliner(); }
|
||||
|
||||
|
@@ -56,8 +56,8 @@ namespace {
|
||||
}
|
||||
|
||||
char PartSpec::ID = 0;
|
||||
static RegisterPass<PartSpec>
|
||||
X("partialspecialization", "Partial Specialization");
|
||||
INITIALIZE_PASS(PartSpec, "partialspecialization",
|
||||
"Partial Specialization", false, false);
|
||||
|
||||
// Specialize F by replacing the arguments (keys) in replacements with the
|
||||
// constants (values). Replace all calls to F with those constants with
|
||||
|
@@ -48,8 +48,8 @@ namespace {
|
||||
}
|
||||
|
||||
char PruneEH::ID = 0;
|
||||
static RegisterPass<PruneEH>
|
||||
X("prune-eh", "Remove unused exception handling info");
|
||||
INITIALIZE_PASS(PruneEH, "prune-eh",
|
||||
"Remove unused exception handling info", false, false);
|
||||
|
||||
Pass *llvm::createPruneEHPass() { return new PruneEH(); }
|
||||
|
||||
|
@@ -36,8 +36,8 @@ public:
|
||||
} // end anonymous namespace
|
||||
|
||||
char StripDeadPrototypesPass::ID = 0;
|
||||
static RegisterPass<StripDeadPrototypesPass>
|
||||
X("strip-dead-prototypes", "Strip Unused Function Prototypes");
|
||||
INITIALIZE_PASS(StripDeadPrototypesPass, "strip-dead-prototypes",
|
||||
"Strip Unused Function Prototypes", false, false);
|
||||
|
||||
bool StripDeadPrototypesPass::runOnModule(Module &M) {
|
||||
bool MadeChange = false;
|
||||
|
@@ -89,32 +89,33 @@ namespace {
|
||||
}
|
||||
|
||||
char StripSymbols::ID = 0;
|
||||
static RegisterPass<StripSymbols>
|
||||
X("strip", "Strip all symbols from a module");
|
||||
INITIALIZE_PASS(StripSymbols, "strip",
|
||||
"Strip all symbols from a module", false, false);
|
||||
|
||||
ModulePass *llvm::createStripSymbolsPass(bool OnlyDebugInfo) {
|
||||
return new StripSymbols(OnlyDebugInfo);
|
||||
}
|
||||
|
||||
char StripNonDebugSymbols::ID = 0;
|
||||
static RegisterPass<StripNonDebugSymbols>
|
||||
Y("strip-nondebug", "Strip all symbols, except dbg symbols, from a module");
|
||||
INITIALIZE_PASS(StripNonDebugSymbols, "strip-nondebug",
|
||||
"Strip all symbols, except dbg symbols, from a module",
|
||||
false, false);
|
||||
|
||||
ModulePass *llvm::createStripNonDebugSymbolsPass() {
|
||||
return new StripNonDebugSymbols();
|
||||
}
|
||||
|
||||
char StripDebugDeclare::ID = 0;
|
||||
static RegisterPass<StripDebugDeclare>
|
||||
Z("strip-debug-declare", "Strip all llvm.dbg.declare intrinsics");
|
||||
INITIALIZE_PASS(StripDebugDeclare, "strip-debug-declare",
|
||||
"Strip all llvm.dbg.declare intrinsics", false, false);
|
||||
|
||||
ModulePass *llvm::createStripDebugDeclarePass() {
|
||||
return new StripDebugDeclare();
|
||||
}
|
||||
|
||||
char StripDeadDebugInfo::ID = 0;
|
||||
static RegisterPass<StripDeadDebugInfo>
|
||||
A("strip-dead-debug-info", "Strip debug info for unused symbols");
|
||||
INITIALIZE_PASS(StripDeadDebugInfo, "strip-dead-debug-info",
|
||||
"Strip debug info for unused symbols", false, false);
|
||||
|
||||
ModulePass *llvm::createStripDeadDebugInfoPass() {
|
||||
return new StripDeadDebugInfo();
|
||||
|
@@ -62,8 +62,8 @@ namespace {
|
||||
}
|
||||
|
||||
char SRETPromotion::ID = 0;
|
||||
static RegisterPass<SRETPromotion>
|
||||
X("sretpromotion", "Promote sret arguments to multiple ret values");
|
||||
INITIALIZE_PASS(SRETPromotion, "sretpromotion",
|
||||
"Promote sret arguments to multiple ret values", false, false);
|
||||
|
||||
Pass *llvm::createStructRetPromotionPass() {
|
||||
return new SRETPromotion();
|
||||
|
Reference in New Issue
Block a user