[llvm-commits] [llvm] r122516 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Benjamin Kramer benny.kra at googlemail.com
Fri Dec 24 08:12:59 PST 2010


On 23.12.2010, at 21:57, Owen Anderson wrote:

> Author: resistor
> Date: Thu Dec 23 14:57:35 2010
> New Revision: 122516
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=122516&view=rev
> Log:
> It is possible for SimplifyCFG to cause PHI nodes to become redundant too late in the optimization
> pipeline to be caught by instcombine, and it's not feasible to catch them in SimplifyCFG because the
> use-lists are in an inconsistent state at the point where it could know that it need to simplify them.
> Instead, have CodeGenPrepare look for trivially redundant PHIs as part of its general cleanup effort.

Would it hurt much if we ran SimplifyInstruction on all instructions, not just PHIs? I've seen SimplifyCFG
producing other nonsense like "%y = or i1 false, %x" too.



More information about the llvm-commits mailing list