[PATCH] D24095: [lib/LTO] Add a way to run a custom pipeline

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 11:59:21 PDT 2016


mehdi_amini added inline comments.

================
Comment at: lib/LTO/LTOBackend.cpp:145
@@ -138,1 +144,3 @@
 
+static void runNewPMCustomPasses(Config &C, Module &M, TargetMachine *TM) {
+  PassBuilder PB(TM);
----------------
mehdi_amini wrote:
> Please use better variable name.
> 
> (I know the rest of the file doesn't, but we should fix it and not spread this).
Instead of taking a config, you can pass directly the string and the bool you need. 
Then, it looks like this function is something that will be needed in multiple place in LLVM and could be implemented somewhere else.

================
Comment at: lib/LTO/LTOBackend.cpp:165
@@ +164,3 @@
+  if (!C.DisableVerify)
+    MPM.addPass(VerifierPass());
+
----------------
We always verify the input.


https://reviews.llvm.org/D24095





More information about the llvm-commits mailing list