mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
c510a7097b
commit
21d35c1399
@ -488,13 +488,14 @@ void MachineLICM::HoistRegion(MachineDomTreeNode *N) {
|
|||||||
MII = NextMII;
|
MII = NextMII;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<MachineDomTreeNode*> &Children = N->getChildren();
|
|
||||||
// Don't hoist things out of a large switch statement. This often causes
|
// 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
|
// code to be hoisted that wasn't going to be executed, and increases
|
||||||
// register pressure in a situation where it's likely to matter.
|
// 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)
|
for (unsigned I = 0, E = Children.size(); I != E; ++I)
|
||||||
HoistRegion(Children[I]);
|
HoistRegion(Children[I]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// IsLICMCandidate - Returns true if the instruction may be a suitable
|
/// IsLICMCandidate - Returns true if the instruction may be a suitable
|
||||||
|
Loading…
Reference in New Issue
Block a user