From: Xinliang David Li Date: Sun, 15 May 2016 01:04:24 +0000 (+0000) Subject: Rename pass name to prepare to new PM porting /NFC X-Git-Tag: android-x86-7.1-r4~33422 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=17b42bdb89a88cb67de89677a15ef962294f67ae;p=android-x86%2Fexternal-llvm.git Rename pass name to prepare to new PM porting /NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269586 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index 207d90064ec..0825de5e4ab 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -126,7 +126,7 @@ void initializeAAResultsWrapperPassPass(PassRegistry &); void initializeGCOVProfilerPass(PassRegistry&); void initializePGOInstrumentationGenLegacyPassPass(PassRegistry&); void initializePGOInstrumentationUseLegacyPassPass(PassRegistry&); -void initializePGOIndirectCallPromotionPass(PassRegistry&); +void initializePGOIndirectCallPromotionLegacyPassPass(PassRegistry&); void initializeInstrProfilingLegacyPassPass(PassRegistry &); void initializeAddressSanitizerPass(PassRegistry&); void initializeAddressSanitizerModulePass(PassRegistry&); diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h index be613df400f..72629398f00 100644 --- a/include/llvm/LinkAllPasses.h +++ b/include/llvm/LinkAllPasses.h @@ -91,7 +91,7 @@ namespace { (void) llvm::createGCOVProfilerPass(); (void) llvm::createPGOInstrumentationGenLegacyPass(); (void) llvm::createPGOInstrumentationUseLegacyPass(); - (void) llvm::createPGOIndirectCallPromotionPass(); + (void) llvm::createPGOIndirectCallPromotionLegacyPass(); (void) llvm::createInstrProfilingLegacyPass(); (void) llvm::createFunctionImportPass(); (void) llvm::createFunctionInliningPass(); diff --git a/include/llvm/Transforms/Instrumentation.h b/include/llvm/Transforms/Instrumentation.h index 24e4247e847..e9a4fe75fd8 100644 --- a/include/llvm/Transforms/Instrumentation.h +++ b/include/llvm/Transforms/Instrumentation.h @@ -83,7 +83,7 @@ ModulePass *createGCOVProfilerPass(const GCOVOptions &Options = ModulePass *createPGOInstrumentationGenLegacyPass(); ModulePass * createPGOInstrumentationUseLegacyPass(StringRef Filename = StringRef("")); -ModulePass *createPGOIndirectCallPromotionPass(bool InLTO = false); +ModulePass *createPGOIndirectCallPromotionLegacyPass(bool InLTO = false); /// Options for the frontend instrumentation based profiling pass. struct InstrProfOptions { diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp b/lib/Transforms/IPO/PassManagerBuilder.cpp index af2426324ee..983bae8ab1d 100644 --- a/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -371,7 +371,7 @@ void PassManagerBuilder::populateModulePassManager( /// not run it a second time addPGOInstrPasses(MPM); // Indirect call promotion that promotes intra-module targets only. - MPM.add(createPGOIndirectCallPromotionPass()); + MPM.add(createPGOIndirectCallPromotionLegacyPass()); } if (EnableNonLTOGlobalsModRef) @@ -583,7 +583,7 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) { // by the earlier promotion pass that promotes intra-module targets. // This two-step promotion is to save the compile time. For LTO, it should // produce the same result as if we only do promotion here. - PM.add(createPGOIndirectCallPromotionPass(true)); + PM.add(createPGOIndirectCallPromotionLegacyPass(true)); // Propagate constants at call sites into the functions they call. This // opens opportunities for globalopt (and inlining) by substituting function diff --git a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp index e83e9da66ac..b71cd97ec5f 100644 --- a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp +++ b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp @@ -111,12 +111,14 @@ static cl::opt cl::desc("Dump IR after transformation happens")); namespace { -class PGOIndirectCallPromotion : public ModulePass { +class PGOIndirectCallPromotionLegacyPass : public ModulePass { public: static char ID; - PGOIndirectCallPromotion(bool InLTO = false) : ModulePass(ID), InLTO(InLTO) { - initializePGOIndirectCallPromotionPass(*PassRegistry::getPassRegistry()); + PGOIndirectCallPromotionLegacyPass(bool InLTO = false) + : ModulePass(ID), InLTO(InLTO) { + initializePGOIndirectCallPromotionLegacyPassPass( + *PassRegistry::getPassRegistry()); } const char *getPassName() const override { @@ -132,14 +134,14 @@ private: }; } // end anonymous namespace -char PGOIndirectCallPromotion::ID = 0; -INITIALIZE_PASS(PGOIndirectCallPromotion, "pgo-icall-prom", +char PGOIndirectCallPromotionLegacyPass::ID = 0; +INITIALIZE_PASS(PGOIndirectCallPromotionLegacyPass, "pgo-icall-prom", "Use PGO instrumentation profile to promote indirect calls to " "direct calls.", false, false) -ModulePass *llvm::createPGOIndirectCallPromotionPass(bool InLTO) { - return new PGOIndirectCallPromotion(InLTO); +ModulePass *llvm::createPGOIndirectCallPromotionLegacyPass(bool InLTO) { + return new PGOIndirectCallPromotionLegacyPass(InLTO); } // The class for main data structure to promote indirect calls to conditional @@ -684,7 +686,7 @@ static bool promoteIndirectCalls(Module &M, bool InLTO) { return Changed; } -bool PGOIndirectCallPromotion::runOnModule(Module &M) { +bool PGOIndirectCallPromotionLegacyPass::runOnModule(Module &M) { // Command-line option has the priority for InLTO. InLTO |= ICPLTOMode; return promoteIndirectCalls(M, InLTO); diff --git a/lib/Transforms/Instrumentation/Instrumentation.cpp b/lib/Transforms/Instrumentation/Instrumentation.cpp index b31aaf319e7..372ec616c18 100644 --- a/lib/Transforms/Instrumentation/Instrumentation.cpp +++ b/lib/Transforms/Instrumentation/Instrumentation.cpp @@ -62,7 +62,7 @@ void llvm::initializeInstrumentation(PassRegistry &Registry) { initializeGCOVProfilerPass(Registry); initializePGOInstrumentationGenLegacyPassPass(Registry); initializePGOInstrumentationUseLegacyPassPass(Registry); - initializePGOIndirectCallPromotionPass(Registry); + initializePGOIndirectCallPromotionLegacyPassPass(Registry); initializeInstrProfilingLegacyPassPass(Registry); initializeMemorySanitizerPass(Registry); initializeThreadSanitizerPass(Registry);