diff options
author | Dale Johannesen <dalej@apple.com> | 2010-07-20 21:29:12 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-07-20 21:29:12 +0000 |
commit | 21d35c1399cbf353abfad82fc47c919ffbe7abc6 (patch) | |
tree | fa8d867803f3640e6406442ab7d8f7a973afe35d | |
parent | c510a7097b05f49a39f89174c64c61fb5f5a8894 (diff) |
Fix test for switch statements and increase
threshold a bit per experimentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108935 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/MachineLICM.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 83f66ce094..9409d88baf 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/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 |