[llvm-branch-commits] [llvm-branch] r90148 - /llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp
Bob Wilson
bob.wilson at apple.com
Mon Nov 30 10:57:18 PST 2009
Author: bwilson
Date: Mon Nov 30 12:57:18 2009
New Revision: 90148
URL: http://llvm.org/viewvc/llvm-project?rev=90148&view=rev
Log:
--- Merging r90147 into '.':
U lib/CodeGen/TailDuplication.cpp
Modified:
llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp
Modified: llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp?rev=90148&r1=90147&r2=90148&view=diff
==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/CodeGen/TailDuplication.cpp Mon Nov 30 12:57:18 2009
@@ -116,14 +116,14 @@
// duplicate only one, because one branch instruction can be eliminated to
// compensate for the duplication.
unsigned MaxDuplicateCount;
- if (MF.getFunction()->hasFnAttr(Attribute::OptimizeForSize))
- MaxDuplicateCount = 1;
- else if (!TailBB->empty() && TailBB->back().getDesc().isIndirectBranch())
+ if (!TailBB->empty() && TailBB->back().getDesc().isIndirectBranch())
// If the target has hardware branch prediction that can handle indirect
// branches, duplicating them can often make them predictable when there
// are common paths through the code. The limit needs to be high enough
// to allow undoing the effects of tail merging.
MaxDuplicateCount = 20;
+ else if (MF.getFunction()->hasFnAttr(Attribute::OptimizeForSize))
+ MaxDuplicateCount = 1;
else
MaxDuplicateCount = TailDuplicateSize;
More information about the llvm-branch-commits
mailing list