mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Pulled CodeMetrics out of InlineCost.h and made it a bit more general, so it can be reused from PartialSpecializationCost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -445,7 +445,7 @@ bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val) {
|
||||
// This is a very ad-hoc heuristic.
|
||||
if (Metrics.NumInsts > Threshold ||
|
||||
Metrics.NumBlocks * 5 > Threshold ||
|
||||
Metrics.NeverInline) {
|
||||
Metrics.containsIndirectBr || Metrics.isRecursive) {
|
||||
DEBUG(dbgs() << "NOT unswitching loop %"
|
||||
<< currentLoop->getHeader()->getName() << ", cost too high: "
|
||||
<< currentLoop->getBlocks().size() << "\n");
|
||||
|
Reference in New Issue
Block a user