Skip to content

Commit 0ff902e

Browse files
committed
Directly set BBID when parsing MIR.
1 parent 5cc499a commit 0ff902e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/CodeGen/MIRParser/MIParser.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ bool MIParser::parseBasicBlockDefinition(
780780
"' is not defined in the function '" +
781781
MF.getName() + "'");
782782
}
783-
auto *MBB = MF.CreateMachineBasicBlock(BB);
783+
auto *MBB = MF.CreateMachineBasicBlock(BB, BBID);
784784
MF.insert(MF.end(), MBB);
785785
bool WasInserted = MBBSlots.insert(std::make_pair(ID, MBB)).second;
786786
if (!WasInserted)
@@ -799,9 +799,6 @@ bool MIParser::parseBasicBlockDefinition(
799799
MBB->setSectionID(*SectionID);
800800
MF.setBBSectionsType(BasicBlockSection::List);
801801
}
802-
if (BBID.has_value()) {
803-
MBB->setBBID(BBID.value());
804-
}
805802
MBB->setCallFrameSize(CallFrameSize);
806803
return false;
807804
}

0 commit comments

Comments
 (0)