aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-11 19:48:59 +0000
committerDan Gohman <gohman@apple.com>2009-11-11 19:48:59 +0000
commit64b5d0f46849f74fac5f853bb335de29cf2e1b83 (patch)
treee6ff4563185f2980b265bc6de9066f1776c634c4 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent062c2919494fabd10e68964b571903c8d8577a2c (diff)
downloadllvm-64b5d0f46849f74fac5f853bb335de29cf2e1b83.zip
llvm-64b5d0f46849f74fac5f853bb335de29cf2e1b83.tar.gz
llvm-64b5d0f46849f74fac5f853bb335de29cf2e1b83.tar.bz2
Add support for tail duplication to BranchFolding, and extend
tail merging support to handle more cases. - Recognize several cases where tail merging is beneficial even when the tail size is smaller than the generic threshold. - Make use of MachineInstrDesc::isBarrier to help detect non-fallthrough blocks. - Check for and avoid disrupting fall-through edges in more cases. llvm-svn: 86871
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 7fbdb12..14d6682 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -371,10 +371,7 @@ bool MachineBasicBlock::CorrectExtraCFGEdges(MachineBasicBlock *DestA,
MachineBasicBlock::succ_iterator SI = succ_begin();
MachineBasicBlock *OrigDestA = DestA, *OrigDestB = DestB;
while (SI != succ_end()) {
- if (*SI == DestA && DestA == DestB) {
- DestA = DestB = 0;
- ++SI;
- } else if (*SI == DestA) {
+ if (*SI == DestA) {
DestA = 0;
++SI;
} else if (*SI == DestB) {