[PATCH] D138078: [CodeGenPrepare] split critical indirect edges from callbr w/ outputs

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 10:02:03 PST 2022


nickdesaulniers added a comment.

> in SelectionDAGBuilder::visitCallBr

So the issue I hit immediate is that the ValueMap SelectionDAG has maps the indirect destination BB to the original MBB; I can't split the edge and have the CallBrInst lower correctly to refer to the synthesized MBB.

I think I can reuse this commit mostly as is, just move it from codegen prepare to another pass.

It looks like `indirectbr-expand` _is_ enabled at `-O0` and is necessary for correctness IIUC.  Thoughts on moving this there, and maybe renaming the pass to `indirectbr-callbr-expand`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138078



More information about the llvm-commits mailing list