MIR Printer: Remove an outdated TODO comment and assertion. NFC.
authorAlex Lorenz <arphaman@gmail.com>
Tue, 28 Jul 2015 16:56:45 +0000 (16:56 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Tue, 28 Jul 2015 16:56:45 +0000 (16:56 +0000)
This commit removes an outdated TODO comment and a corresponding assertion
which asserts that the mir printer can't the print machine basic blocks that
aren't sequentially numbered.

This comment and assertion were correct when I was working on the patch which
serialized the machine basic blocks, but then I decided to add an 'ID'
attribute to the machine basic block's YAML mapping based on the patch review.
This comment and assertion then became invalid as with the 'ID' attribute we
can serialize the non sequential machine basic blocks and their references
without any problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243447 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MIRPrinter.cpp

index cb20df8eab65dc6a13cf93d643af6f868613cc81..ac37e323487353408bd5058cc650d3d9bd7e73c7 100644 (file)
@@ -166,15 +166,7 @@ void MIRPrinter::print(const MachineFunction &MF) {
   MST.incorporateFunction(*MF.getFunction());
   if (const auto *JumpTableInfo = MF.getJumpTableInfo())
     convert(MST, YamlMF.JumpTableInfo, *JumpTableInfo);
-  int I = 0;
   for (const auto &MBB : MF) {
-    // TODO: Allow printing of non sequentially numbered MBBs.
-    // This is currently needed as the basic block references get their index
-    // from MBB.getNumber(), thus it should be sequential so that the parser can
-    // map back to the correct MBBs when parsing the output.
-    assert(MBB.getNumber() == I++ &&
-           "Can't print MBBs that aren't sequentially numbered");
-    (void)I;
     yaml::MachineBasicBlock YamlMBB;
     convert(MST, YamlMBB, MBB);
     YamlMF.BasicBlocks.push_back(YamlMBB);