[PATCH] D25499: BranchRelaxation: Fix computing indirect branch block size
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 11 22:41:51 PDT 2016
arsenm created this revision.
arsenm added a subscriber: llvm-commits.
Herald added a subscriber: wdng.
https://reviews.llvm.org/D25499
Files:
lib/CodeGen/BranchRelaxation.cpp
Index: lib/CodeGen/BranchRelaxation.cpp
===================================================================
--- lib/CodeGen/BranchRelaxation.cpp
+++ lib/CodeGen/BranchRelaxation.cpp
@@ -116,6 +116,7 @@
unsigned Num = MBB.getNumber();
assert(BlockInfo[Num].Offset % (1u << Align) == 0);
assert(!Num || BlockInfo[PrevNum].postOffset(MBB) <= BlockInfo[Num].Offset);
+ assert(BlockInfo[Num].Size == computeBlockSize(MBB));
PrevNum = Num;
}
#endif
@@ -385,12 +386,9 @@
DebugLoc DL = MI.getDebugLoc();
MI.eraseFromParent();
-
- // insertUnconditonalBranch may have inserted a new block.
- BlockInfo[MBB->getNumber()].Size += TII->insertIndirectBranch(
+ BlockInfo[BranchBB->getNumber()].Size += TII->insertIndirectBranch(
*BranchBB, *DestBB, DL, DestOffset - SrcOffset, RS.get());
- computeBlockSize(*BranchBB);
adjustBlockOffsets(*MBB);
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25499.74325.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161012/29f2eb17/attachment.bin>
More information about the llvm-commits
mailing list