[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 19:00:25 PDT 2016
mjacob added a comment.
For reference: here is the bug report I filed recently: https://llvm.org/bugs/show_bug.cgi?id=27620
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:547
@@ -545,1 +546,3 @@
+ // Get rid of LCSSA nodes.
> mjacob wrote:
> > 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.
> Would InstSimplify work to get rid of these LCSSA PHI nodes?
You're right. I was sure I tried this before.
More information about the llvm-commits