[PATCH] D18126: Port InstrProfiling pass to new pass manager

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 01:16:54 PDT 2016


davidxl added inline comments.

================
Comment at: include/llvm/InitializePasses.h:118-126
@@ -117,18 +117,11 @@
 void initializeDomViewerPass(PassRegistry&);
-void initializeDominanceFrontierWrapperPassPass(PassRegistry&);
-void initializeDominatorTreeWrapperPassPass(PassRegistry&);
-void initializeEarlyIfConverterPass(PassRegistry&);
-void initializeEdgeBundlesPass(PassRegistry&);
-void initializeExpandPostRAPass(PassRegistry&);
+void initializeDominanceFrontierWrapperPassPass(PassRegistry &);
+void initializeDominatorTreeWrapperPassPass(PassRegistry &);
+void initializeEarlyIfConverterPass(PassRegistry &);
+void initializeEdgeBundlesPass(PassRegistry &);
+void initializeExpandPostRAPass(PassRegistry &);
 void initializeAAResultsWrapperPassPass(PassRegistry &);
-void initializeGCOVProfilerPass(PassRegistry&);
-void initializePGOInstrumentationGenPass(PassRegistry&);
-void initializePGOInstrumentationUsePass(PassRegistry&);
-void initializeInstrProfilingPass(PassRegistry&);
-void initializeAddressSanitizerPass(PassRegistry&);
-void initializeAddressSanitizerModulePass(PassRegistry&);
-void initializeMemorySanitizerPass(PassRegistry&);
-void initializeThreadSanitizerPass(PassRegistry&);
-void initializeSanitizerCoverageModulePass(PassRegistry&);
-void initializeDataFlowSanitizerPass(PassRegistry&);
-void initializeScalarizerPass(PassRegistry&);
+void initializeGCOVProfilerPass(PassRegistry &);
+void initializePGOInstrumentationGenPass(PassRegistry &);
+void initializePGOInstrumentationUsePass(PassRegistry &);
+void initializeInstrProfilingLegacyWrapperPassPass(PassRegistry &);
----------------
chandlerc wrote:
> Please don't introduce lots of unrelated formatting changes.
hmm, it seems clang-format did that for me.

================
Comment at: include/llvm/Transforms/Instrumentation.h:101
@@ -97,1 +100,3 @@
 
+class InstrProfiling {
+public:
----------------
chandlerc wrote:
> I wouldn't put all of this into the common Instrumentation.h file. Instead, like with all the other pass ports, please add a header for this specific pass. That may also help address your concerns with the design.
probably only partially address my concern -- there will still be more extra dependency created.

================
Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:34
@@ -33,2 +33,3 @@
 
-class InstrProfiling : public ModulePass {
+class InstrProfilingLegacyWrapperPass : public ModulePass {
+  InstrProfiling InstrProf;
----------------
chandlerc wrote:
> This isn't a wrapper pass. Those are passes that wrap an analysis result. This is just a transformation pass.
ok.


http://reviews.llvm.org/D18126





More information about the llvm-commits mailing list