[PATCH] D29308: [PM] Hook the instrumented PGO machinery in the new PM

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 16:45:15 PST 2017


davide added inline comments.


================
Comment at: lib/Passes/PassBuilder.cpp:394
+    // In the old pass manager, this is a cl::opt. Should still this be one?
+    IP.DefaultThreshold = 75;
+
----------------
davidxl wrote:
> can you refactor the old pm code such that the existing internal options can be reused here?
I'm under the impression that several (me included) dislike the use of `cl::opt` for the new pass manager. Do you have any suggestions on how to handle this haring without sharing the `cl::opt`s ?


================
Comment at: lib/Passes/PassBuilder.cpp:487
+  // Indirect call promotion that promotes intra-module targes only.
+  MPM.addPass(PGOIndirectCallPromotion());
+
----------------
davidxl wrote:
> this seems like exposing a bug in old implementation as well. IndirectCallPromotion pass need not to be run profile-use is in effect. Otherwise it is a waste of compile time.
Will submit a patch separately. It's not gonna be a substantial reduction in compile time as this pass is very fast, but still there's no point in running it.


https://reviews.llvm.org/D29308





More information about the llvm-commits mailing list