[PATCH] D46399: Skip blocks with no predecessors for CFIInstrInserter verify
Petar Jovanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 3 11:08:03 PDT 2018
petarj created this revision.
petarj added reviewers: craig.topper, thegameg.
Skip nested block that have no predecessors. It finetunes r330706 and
resolves build issue reported by Craig Topper.
Repository:
rL LLVM
https://reviews.llvm.org/D46399
Files:
lib/CodeGen/CFIInstrInserter.cpp
Index: lib/CodeGen/CFIInstrInserter.cpp
===================================================================
--- lib/CodeGen/CFIInstrInserter.cpp
+++ lib/CodeGen/CFIInstrInserter.cpp
@@ -293,6 +293,8 @@
unsigned ErrorNum = 0;
for (MachineBasicBlock &CurrMBB : MF) {
const MBBCFAInfo &CurrMBBInfo = MBBVector[CurrMBB.getNumber()];
+ if (CurrMBB.getNumber() != MF.front().getNumber() && !CurrMBB.pred_size())
+ continue;
for (MachineBasicBlock *Succ : CurrMBB.successors()) {
const MBBCFAInfo &SuccMBBInfo = MBBVector[Succ->getNumber()];
// Check that incoming offset and register values of successors match the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46399.145054.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/bcad4144/attachment-0001.bin>
More information about the llvm-commits
mailing list