[llvm-commits] [llvm] r108935 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp
Dale Johannesen
dalej at apple.com
Tue Jul 20 14:29:12 PDT 2010
Author: johannes
Date: Tue Jul 20 16:29:12 2010
New Revision: 108935
URL: http://llvm.org/viewvc/llvm-project?rev=108935&view=rev
Log:
Fix test for switch statements and increase
threshold a bit per experimentation.
Modified:
llvm/trunk/lib/CodeGen/MachineLICM.cpp
Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=108935&r1=108934&r2=108935&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Tue Jul 20 16:29:12 2010
@@ -488,13 +488,14 @@
MII = NextMII;
}
- const std::vector<MachineDomTreeNode*> &Children = N->getChildren();
// Don't hoist things out of a large switch statement. This often causes
// code to be hoisted that wasn't going to be executed, and increases
// register pressure in a situation where it's likely to matter.
- if (Children.size() < 10)
+ if (BB->succ_size() < 25) {
+ const std::vector<MachineDomTreeNode*> &Children = N->getChildren();
for (unsigned I = 0, E = Children.size(); I != E; ++I)
HoistRegion(Children[I]);
+ }
}
/// IsLICMCandidate - Returns true if the instruction may be a suitable
More information about the llvm-commits
mailing list