[PATCH] D76961: [BranchFolder] don't remove MBB's that have their address taken

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 17:39:50 PDT 2020


nickdesaulniers created this revision.
nickdesaulniers added reviewers: void, craig.topper.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

MBB's that have their address taken are indirect targets of
INLINEASM_BR, removing them drops used blocks.

This patch fixes observed issues with `asm goto` with output
constraints.  An improvement upon this patch might to evaluate if a MBB
has its address taken, does the MBB that took its address qualify as a
"predecessor?" If yes, then we should re-evaluate how we calculate
predecessors for MBBs with the recent addition of INLINEASM_BR.  If no,
then this patch is probably the best we can hope for.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76961

Files:
  llvm/lib/CodeGen/BranchFolding.cpp
  llvm/test/CodeGen/X86/callbr-asm-branch-folding2.ll
  llvm/test/CodeGen/X86/callbr-asm-outputs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76961.253259.patch
Type: text/x-patch
Size: 5544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200328/d4ef7eb2/attachment.bin>


More information about the llvm-commits mailing list