[PATCH] D88438: BreakCriticalEdges: bail if loop-simplify form requested for CallBr terminated BB

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 18:05:10 PDT 2020


efriedma added a comment.

> The concept of splitting a critical edge is still relatively new to me; any thoughts on *why* it would not be ok to split a critical branch of an indirect-like jump?

The problem has to do with blockaddress.

For normal branches, splitting an edge is usually straightforward: you just introduce a new block that branches to the original block, and then you rewrite the branch in the predecessor.  But suppose you have a block with two indirectbr predecessors, and you want to split the edge.  In that case, the "rewrite the branch" step doesn't work: you can't rewrite the address argument to the indirectbr.  (Or at least, you can't without performing some invasive rewrite like indirectbr->switch lowering.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88438



More information about the llvm-commits mailing list