[PATCH] D20606: [PM] Schedule InstCombine after late LICM run, to clean up LCSSA nodes.

Manuel Jacob via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 17:09:26 PDT 2016


mjacob added inline comments.

================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:547
@@ -545,1 +546,3 @@
+    // Get rid of LCSSA nodes.
+    addInstructionCombiningPass(MPM);
   }
----------------
The LCSSA will end up in the optimized output. Two cases in which this was a problem for me:

1) If I run additional passes after O3, e.g. late statepoint insertion for GC, they get feed with suboptimal code, possibly affecting their output. That can of course easily be worked around by running InstCombine manually in between.

2) I'm working on a backend which directly emits code from LLVM IR. Coworkers complained about unnecessary phi nodes. Again this can be worked around by running InstCombine manually. However that possibly obfuscates the code when debugging.

I'm not sure whether this affects normal backends using SelectionDAG. At least I didn't find InstCombine in the llc pass pipeline.


http://reviews.llvm.org/D20606





More information about the llvm-commits mailing list