[PATCH] D54706: [LoopSimplifyCFG] Remove phis whilst removing CFG edges
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 19 22:25:34 PST 2018
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopSimplifyCFG.cpp:248
+ for (PHINode &Phi : Succ->phis())
+ Phi.removeIncomingValue(BB);
+ }
----------------
dmgreen wrote:
> This can remove empty phi's I believe, which I'm not 100% sure about.
>
> I think it's OK as-is but, Max, this may change with your followon patches. Feel free to commandeer if you think that's easier, otherwise let me know what you think.
Hi, I've done it in a bit more general way (using `removePredecessor` utility function) when re-enabled the patch after revert, see rL347289. The lack of Phis update caused crash on some lib compilation, it is now fixed and works.
Thanks for your effort, though. :)
https://reviews.llvm.org/D54706
More information about the llvm-commits
mailing list