diff options
Diffstat (limited to 'llvm/lib/Target/ARM/ARMConstantIslandPass.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMConstantIslandPass.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp index fb33308e491c..1312b44b49bd 100644 --- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp @@ -414,6 +414,7 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &mf) { // Renumber all of the machine basic blocks in the function, guaranteeing that // the numbers agree with the position of the block in the function. MF->RenumberBlocks(); + DT->updateBlockNumbers(); // Try to reorder and otherwise adjust the block layout to make good use // of the TB[BH] instructions. @@ -425,6 +426,7 @@ bool ARMConstantIslands::runOnMachineFunction(MachineFunction &mf) { T2JumpTables.clear(); // Blocks may have shifted around. Keep the numbering up to date. MF->RenumberBlocks(); + DT->updateBlockNumbers(); } // Align any non-fallthrough blocks @@ -670,8 +672,10 @@ void ARMConstantIslands::doInitialJumpTablePlacement( } // If we did anything then we need to renumber the subsequent blocks. - if (LastCorrectlyNumberedBB) + if (LastCorrectlyNumberedBB) { MF->RenumberBlocks(LastCorrectlyNumberedBB); + DT->updateBlockNumbers(); + } } /// BBHasFallthrough - Return true if the specified basic block can fallthrough @@ -972,6 +976,7 @@ static bool CompareMBBNumbers(const MachineBasicBlock *LHS, void ARMConstantIslands::updateForInsertedWaterBlock(MachineBasicBlock *NewBB) { // Renumber the MBB's to keep them consecutive. NewBB->getParent()->RenumberBlocks(NewBB); + DT->updateBlockNumbers(); // Insert an entry into BBInfo to align it properly with the (newly // renumbered) block numbers. @@ -1034,6 +1039,7 @@ MachineBasicBlock *ARMConstantIslands::splitBlockBeforeInstr(MachineInstr *MI) { // This is almost the same as updateForInsertedWaterBlock, except that // the Water goes after OrigBB, not NewBB. MF->RenumberBlocks(NewBB); + DT->updateBlockNumbers(); // Insert an entry into BBInfo to align it properly with the (newly // renumbered) block numbers. @@ -2485,6 +2491,7 @@ MachineBasicBlock *ARMConstantIslands::adjustJTTargetBlockForward( BB->updateTerminator(OldNext != MF->end() ? &*OldNext : nullptr); // Update numbering to account for the block being moved. MF->RenumberBlocks(); + DT->updateBlockNumbers(); ++NumJTMoved; return nullptr; } @@ -2513,6 +2520,7 @@ MachineBasicBlock *ARMConstantIslands::adjustJTTargetBlockForward( // Update internal data structures to account for the newly inserted MBB. MF->RenumberBlocks(NewBB); + DT->updateBlockNumbers(); // Update the CFG. NewBB->addSuccessor(BB); |
