[PATCH] D69865: [IR] PR27065: Part2. Fix BasicBlock::removePredecessor to not break SSA form.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 15:10:40 PST 2019


jdoerfert added a comment.

In D69865#1736296 <https://reviews.llvm.org/D69865#1736296>, @dendibakh wrote:

> In D69865#1736280 <https://reviews.llvm.org/D69865#1736280>, @jdoerfert wrote:
>
> > Unreachable code is generally allowed to be in non-SSA form.
>
>
> Is it documented somewhere?


Probably is, I don't have a reference handy though.

> I think it adds certain limitations to the usage of some LLVM functionality. For example, if someone decide to link in detached blocks (after removePredecessor) again, (s)he will be surprised to find broken SSA code in there. It limits room for hacking certainly.

While that is not untrue, there is a very simple solution: run trivial dead code removal first. What you are trying to do, generate degenerated unreachable IR, is an uphill battle on more fronts than you would imagine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69865/new/

https://reviews.llvm.org/D69865





More information about the llvm-commits mailing list