diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-02-21 23:39:48 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-02-21 23:39:48 +0000 |
commit | b8ed462ca215298e6b726ff6a7f798b9be37e35a (patch) | |
tree | b83f6bcefdc0ec8c2a387c13bfae010c81338909 /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 37d5484d188fc13545041b806445ff4f7cbd3f3d (diff) | |
download | bcm5719-llvm-b8ed462ca215298e6b726ff6a7f798b9be37e35a.tar.gz bcm5719-llvm-b8ed462ca215298e6b726ff6a7f798b9be37e35a.zip |
Add more debugging output.
llvm-svn: 126158
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index cb81aa3c88c..78a87431fea 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -501,10 +501,11 @@ static bool ProfitableToMerge(MachineBasicBlock *MBB1, MachineBasicBlock *SuccBB, MachineBasicBlock *PredBB) { CommonTailLen = ComputeCommonTailLength(MBB1, MBB2, I1, I2); - MachineFunction *MF = MBB1->getParent(); - if (CommonTailLen == 0) return false; + DEBUG(dbgs() << "Common tail length of BB#" << MBB1->getNumber() + << " and BB#" << MBB2->getNumber() << " is " << CommonTailLen + << '\n'); // It's almost always profitable to merge any number of non-terminator // instructions with the block that falls through into the common successor. @@ -541,6 +542,7 @@ static bool ProfitableToMerge(MachineBasicBlock *MBB1, // we don't have to split a block. At worst we will be introducing 1 new // branch instruction, which is likely to be smaller than the 2 // instructions that would be deleted in the merge. + MachineFunction *MF = MBB1->getParent(); if (EffectiveTailLen >= 2 && MF->getFunction()->hasFnAttr(Attribute::OptimizeForSize) && (I1 == MBB1->begin() || I2 == MBB2->begin())) |