diff options
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp index e83e9da66ac..b71cd97ec5f 100644 --- a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp +++ b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp @@ -111,12 +111,14 @@ static cl::opt<bool> 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); |