summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLICM.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-07-20 21:29:12 +0000
committerDale Johannesen <dalej@apple.com>2010-07-20 21:29:12 +0000
commit6e5ec6263e5f21c388589e9f8905a9b93689b6aa (patch)
treeb15111d29341a9c47f3138af6f40ec49086d88e2 /llvm/lib/CodeGen/MachineLICM.cpp
parent14caa59b14f2fa9277e60e410c1aacf9ce70dd45 (diff)
downloadbcm5719-llvm-6e5ec6263e5f21c388589e9f8905a9b93689b6aa.tar.gz
bcm5719-llvm-6e5ec6263e5f21c388589e9f8905a9b93689b6aa.zip
Fix test for switch statements and increase
threshold a bit per experimentation. llvm-svn: 108935
Diffstat (limited to 'llvm/lib/CodeGen/MachineLICM.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineLICM.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 83f66ce0948..9409d88baf6 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -488,13 +488,14 @@ void MachineLICM::HoistRegion(MachineDomTreeNode *N) {
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
OpenPOWER on IntegriCloud