[PATCH] D89423: Explicitly check for entry basic block, rather than relying on MachineBasicBlock::pred_empty.
Rahman Lavaee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 13:28:37 PDT 2020
rahmanl created this revision.
rahmanl added reviewers: tmsriram, snehasish, amharc.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
rahmanl requested review of this revision.
Sometimes in unoptimized code, we have dangling unreachable basic blocks with no predecessors. Basic block sections should be emitted for those as well. Without this patch, the included test fails with a fatal error in ```AsmPrinter::emitBasicBlockEnd```.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89423
Files:
llvm/include/llvm/CodeGen/MachineBasicBlock.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/test/CodeGen/X86/basic-block-sections-unreachable.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89423.298231.patch
Type: text/x-patch
Size: 4838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201014/5e91dfde/attachment.bin>
More information about the llvm-commits
mailing list