It is possible for SimplifyCFG to cause PHI nodes to become redundant too late in...
authorOwen Anderson <resistor@mac.com>
Thu, 23 Dec 2010 20:57:35 +0000 (20:57 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 23 Dec 2010 20:57:35 +0000 (20:57 +0000)
commitd5f8684b16057df73771b23e293b400cb327e079
tree7397f5379e07b9f335c2853da7bb870a116bcc2e
parent036609bd7d42ed1f57865969e059eb7d1eb6c392
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122516 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp