[PATCH] D22724: [PM] Significantly refactor the pass pipeline parsing to be easier to reason about and less error prone.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 24 15:26:58 PDT 2016


silvas added a subscriber: silvas.

================
Comment at: lib/Passes/PassBuilder.cpp:561
@@ -401,1 +560,3 @@
+
+  // Now expand the basic registered passes from the .inc file.
 #define FUNCTION_PASS(NAME, CREATE_PASS)                                       \
----------------
Do you need error-checking here to verify that InnerPipeline is empty? Just from staring at the code it seems like `gvn(foo,bar)` will just be silently accepted with the `(foo,bar)` ignored.

I think down the road it actually would be useful to allow passes to take "arguments". E.g. `inline(150)` or `instcombine(expensivecombines=true)`. That way we can run two inliners in the same pipeline but with different thresholds.
The instcombine case is actually interesting because currently there is no way to specify an instcombine pass that does not do the "expensive" combines. This means that this textual pipeline description cannot actually describe the O2 pipeline correctly (this is an issue with the old PM too, of course, so it isn't a high priority to fix).


https://reviews.llvm.org/D22724





More information about the llvm-commits mailing list