OSDN Git Service

Rename pass name to prepare to new PM porting /NFC
authorXinliang David Li <davidxl@google.com>
Sun, 15 May 2016 01:04:24 +0000 (01:04 +0000)
committerXinliang David Li <davidxl@google.com>
Sun, 15 May 2016 01:04:24 +0000 (01:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269586 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/Instrumentation.h
lib/Transforms/IPO/PassManagerBuilder.cpp
lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
lib/Transforms/Instrumentation/Instrumentation.cpp

index 207d900..0825de5 100644 (file)
@@ -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&);
index be613df..7262939 100644 (file)
@@ -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();
index 24e4247..e9a4fe7 100644 (file)
@@ -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 {
index af24263..983bae8 100644 (file)
@@ -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
index e83e9da..b71cd97 100644 (file)
@@ -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);
index b31aaf3..372ec61 100644 (file)
@@ -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);