diff options
author | Daniel Hoekwater <hoekwater@google.com> | 2023-08-21 16:29:02 +0000 |
---|---|---|
committer | Daniel Hoekwater <hoekwater@google.com> | 2023-08-24 21:27:55 +0000 |
commit | c9f328844ddd4e4ee296eac6b8e7b8b94ac4c6fc (patch) | |
tree | 4f596eb307f6c6e35c9403e549924d5e6d545437 /llvm/lib/CodeGen/BasicBlockSections.cpp | |
parent | 6021c78fe55e3c4d3e073710bfe279c6a28566d4 (diff) | |
download | llvm-c9f328844ddd4e4ee296eac6b8e7b8b94ac4c6fc.zip llvm-c9f328844ddd4e4ee296eac6b8e7b8b94ac4c6fc.tar.gz llvm-c9f328844ddd4e4ee296eac6b8e7b8b94ac4c6fc.tar.bz2 |
Reland "[CodeGen] Fix unconditional branch duplication issue in bbsections"
Reverted in 4c8d056f50342d5401f5930ed60e5e48b211c3fb because it broke
buildbot `llvm-clang-x86_64-expensive-checks-debian` due to the AArch64
test generating invalid code. The issue still exists, but it's fixed in
D156767, so the AArch64 test should be added there.
Differential Revision: https://reviews.llvm.org/D158674
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BasicBlockSections.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp index 33e70b1..de7c170 100644 --- a/llvm/lib/CodeGen/BasicBlockSections.cpp +++ b/llvm/lib/CodeGen/BasicBlockSections.cpp @@ -258,7 +258,8 @@ void llvm::sortBasicBlocksAndUpdateBranches( [[maybe_unused]] const MachineBasicBlock *EntryBlock = &MF.front(); SmallVector<MachineBasicBlock *> PreLayoutFallThroughs(MF.getNumBlockIDs()); for (auto &MBB : MF) - PreLayoutFallThroughs[MBB.getNumber()] = MBB.getFallThrough(); + PreLayoutFallThroughs[MBB.getNumber()] = + MBB.getFallThrough(/*JumpToFallThrough=*/false); MF.sort(MBBCmp); assert(&MF.front() == EntryBlock && |