Commit 7cadd21e authored by Mythri A's avatar Mythri A Committed by Commit Bot

[turboprop] Don't tier up small functions early from Turboprop

We use a heuristic that tiers up small functions at the first tick to
optimize the small functions early. When tiering up from Turboprop it
isn't important to tier up these functions quite early since they are
already executing optimized code.

Bug: v8:9684
Change-Id: Iaa647e0e03f0b4bf9cd0da7feb1e2d0e36004bc1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2656258Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72425}
parent 8499257a
......@@ -251,18 +251,10 @@ namespace {
bool ShouldOptimizeAsSmallFunction(int bytecode_size, int ticks,
bool any_ic_changed,
bool active_tier_is_turboprop) {
if (FLAG_turboprop) return false;
if (any_ic_changed || bytecode_size >= kMaxBytecodeSizeForEarlyOpt)
return false;
// Without turboprop we always allow early optimizations for small functions
if (!FLAG_turboprop) return true;
// For turboprop, we only do small function optimizations when tiering up from
// TP-> TF. We should also scale the ticks, so we optimize small functions
// when reaching one tick for top tier.
// TODO(turboprop, mythria): Investigate if small function optimization is
// required at all and avoid this if possible by changing the heuristics to
// take function size into account.
return active_tier_is_turboprop &&
ticks > FLAG_ticks_scale_factor_for_top_tier;
return true;
}
} // namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment