Commit 5fc75b26 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Disable general purpose inlining with asm.js code.

This adapts the general purpose inlining heuristic to not inline within
or across the boundary of asm.js code. Note that this only affects the
heuristics, from a functional point of view it is still supported.

R=bmeurer@chromium.org
BUG=chromium:549000
LOG=n

Review URL: https://codereview.chromium.org/1418823005

Cr-Commit-Position: refs/heads/master@{#31654}
parent 747ff0eb
......@@ -4,6 +4,7 @@
#include "src/compiler/js-inlining-heuristic.h"
#include "src/compiler.h"
#include "src/compiler/dead-code-elimination.h" // TODO(mstarzinger): Remove!
#include "src/compiler/node-matchers.h"
#include "src/objects-inl.h"
......@@ -54,6 +55,10 @@ Reduction JSInliningHeuristic::Reduce(Node* node) {
return NoChange();
}
// Avoid inlining within or across the boundary of asm.js code.
if (info_->shared_info()->asm_function()) return NoChange();
if (function->shared()->asm_function()) return NoChange();
// Gather feedback on how often this call site has been hit before.
CallFunctionParameters p = CallFunctionParametersOf(node->op());
int calls = -1; // Same default as CallICNexus::ExtractCallCount.
......
......@@ -21,7 +21,8 @@ class JSInliningHeuristic final : public AdvancedReducer {
local_zone_(local_zone),
jsgraph_(jsgraph),
inliner_(editor, local_zone, info, jsgraph),
candidates_(local_zone) {}
candidates_(local_zone),
info_(info) {}
Reduction Reduce(Node* node) final;
......@@ -44,6 +45,7 @@ class JSInliningHeuristic final : public AdvancedReducer {
JSGraph* jsgraph_;
JSInliner inliner_;
ZoneVector<Candidate> candidates_;
CompilationInfo* info_;
};
} // namespace compiler
......
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