Commit 402f2760 authored by Mythri Alle's avatar Mythri Alle Committed by Commit Bot

Revert "[Turbofan] Include size of parent function in inlining decisions."

This reverts commit 48cee973.

Reason for revert: Including size of parent function in the inlining budget does not allow even small functions to be inlined into large functions. This causes regressions on some benchmarks: https://bugs.chromium.org/p/chromium/issues/detail?id=747247  

Bug:747247

Original change's description:
> [Turbofan] Include size of parent function in inlining decisions.
> 
> The size of parent function is not considered when taking decisions
> on which functions to inline. This cl, includes the size of the
> parent function to the cumulative count. 
> 
> Bug: 
> Change-Id: Ib8f4ec684f8313f7c2e29237580bb3c0403930bd
> Reviewed-on: https://chromium-review.googlesource.com/506205
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46789}

TBR=mstarzinger@chromium.org,mythria@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ic8a5282f4f41474dc1608044a81920cdd794437d
Reviewed-on: https://chromium-review.googlesource.com/609780Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47270}
parent 6527d863
......@@ -19,23 +19,6 @@ namespace compiler {
if (FLAG_trace_turbo_inlining) PrintF(__VA_ARGS__); \
} while (false)
JSInliningHeuristic::JSInliningHeuristic(Editor* editor, Mode mode,
Zone* local_zone,
CompilationInfo* info,
JSGraph* jsgraph,
SourcePositionTable* source_positions)
: AdvancedReducer(editor),
mode_(mode),
inliner_(editor, local_zone, info, jsgraph, source_positions),
candidates_(local_zone),
seen_(local_zone),
jsgraph_(jsgraph) {
// Initialize cumulative_count_ with the size of the current function.
if (info->shared_info()->HasBytecodeArray()) {
cumulative_count_ = info->shared_info()->bytecode_array()->length();
}
}
namespace {
int CollectFunctions(Node* node, Handle<JSFunction>* functions,
......
......@@ -16,7 +16,13 @@ class JSInliningHeuristic final : public AdvancedReducer {
enum Mode { kGeneralInlining, kRestrictedInlining, kStressInlining };
JSInliningHeuristic(Editor* editor, Mode mode, Zone* local_zone,
CompilationInfo* info, JSGraph* jsgraph,
SourcePositionTable* source_positions);
SourcePositionTable* source_positions)
: AdvancedReducer(editor),
mode_(mode),
inliner_(editor, local_zone, info, jsgraph, source_positions),
candidates_(local_zone),
seen_(local_zone),
jsgraph_(jsgraph) {}
const char* reducer_name() const override { return "JSInliningHeuristic"; }
......
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