[PATCH] D78341: Change callbr to only define its output SSA variable on the normal path, not the indirect targets.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 11:20:39 PDT 2020


rnk added a comment.

I think we should make this change. I have this idea that we can eliminate catchswitch by using callbr instead of invoke for Windows EH. Catchswitch effectively allows us to multiplex unwind edges from invoke and cleanupret. However, catchswitch blocks have no valid insertion point for non-phi instructions, and this causes a long tail of bugs where optimizers (somewhat reasonably) assume they can find an insertion point after any phi. Using callbr would help us make the CFG more accurate, and if we did that, we would want the return value to only be available on the normal edge.

If we do ever add support for asm blobs that have outputs along non-default edges, we can add some new IR construct for that (burn that bridge when we get there, as they say). `asmbrpad`, anyone?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78341





More information about the llvm-commits mailing list