[PATCH] D20267: [LTO] Add the ability to specify a subset of passes to run

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun May 15 12:24:15 PDT 2016

ruiu accepted this revision.
ruiu added a reviewer: ruiu.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM with a few nits.

Comment at: ELF/LTO.cpp:65
@@ -58,5 +64,3 @@
-// Run LTO passes.
-// Note that the gold plugin has a similar piece of code, so
-// it is probably better to move this code to a common place.
-static void runLTOPasses(Module &M, TargetMachine &TM) {
+static void runNewCustomLtoPasses(Module &M, TargetMachine &TM) {
+    PassBuilder PB(&TM);
Fix indentation of this code.

Comment at: ELF/LTO.cpp:90
@@ +89,3 @@
+    if (!PB.parsePassPipeline(MPM, Config->LtoNewPmPasses)) {
+      error("unable to parse pass pipeline description");
+      return;
  error("unable to parse pass pipeline description: " + Config->LtoNewPmPasses);

Comment at: ELF/LTO.cpp:116
@@ +115,3 @@
+static void runLTOPasses(Module &M, TargetMachine &TM) {
+  if (!Config->LtoNewPmPasses.empty()) {
Remove this line.


More information about the llvm-commits mailing list