Commit 64672af4 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[turbofan] Remove remnants of code flusher support.

This removes special support in the compilation pipeline to keep alive
unoptimized code for inlined functions (i.e. preventing the code flusher
from clearing it). Now that the code flusher is gone, this is obsolete.

R=jarin@chromium.org

Change-Id: I00361d12f2d17556056d06c10ad19f09a4772cd8
Reviewed-on: https://chromium-review.googlesource.com/517948Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45568}
parent 2f3f974f
...@@ -239,8 +239,7 @@ void CompilationInfo::SetOptimizing() { ...@@ -239,8 +239,7 @@ void CompilationInfo::SetOptimizing() {
int CompilationInfo::AddInlinedFunction( int CompilationInfo::AddInlinedFunction(
Handle<SharedFunctionInfo> inlined_function, SourcePosition pos) { Handle<SharedFunctionInfo> inlined_function, SourcePosition pos) {
int id = static_cast<int>(inlined_functions_.size()); int id = static_cast<int>(inlined_functions_.size());
inlined_functions_.push_back(InlinedFunctionHolder( inlined_functions_.push_back(InlinedFunctionHolder(inlined_function, pos));
inlined_function, handle(inlined_function->code()), pos));
return id; return id;
} }
......
...@@ -280,18 +280,11 @@ class V8_EXPORT_PRIVATE CompilationInfo final { ...@@ -280,18 +280,11 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
struct InlinedFunctionHolder { struct InlinedFunctionHolder {
Handle<SharedFunctionInfo> shared_info; Handle<SharedFunctionInfo> shared_info;
// Root that holds the unoptimized code of the inlined function alive
// (and out of reach of code flushing) until we finish compilation.
// Do not remove.
Handle<Code> inlined_code_object_root;
InliningPosition position; InliningPosition position;
InlinedFunctionHolder(Handle<SharedFunctionInfo> inlined_shared_info, InlinedFunctionHolder(Handle<SharedFunctionInfo> inlined_shared_info,
Handle<Code> inlined_code_object_root,
SourcePosition pos) SourcePosition pos)
: shared_info(inlined_shared_info), : shared_info(inlined_shared_info) {
inlined_code_object_root(inlined_code_object_root) {
position.position = pos; position.position = pos;
// initialized when generating the deoptimization literals // initialized when generating the deoptimization literals
position.inlined_function_id = DeoptimizationInputData::kNotInlinedIndex; position.inlined_function_id = DeoptimizationInputData::kNotInlinedIndex;
......
...@@ -107,16 +107,6 @@ void CodeGenerator::AssembleCode() { ...@@ -107,16 +107,6 @@ void CodeGenerator::AssembleCode() {
} }
inlined_function_count_ = deoptimization_literals_.size(); inlined_function_count_ = deoptimization_literals_.size();
// Define deoptimization literals for all unoptimized code objects of inlined
// functions. This ensures unoptimized code is kept alive by optimized code.
for (const CompilationInfo::InlinedFunctionHolder& inlined :
info->inlined_functions()) {
if (!inlined.shared_info.equals(info->shared_info())) {
DefineDeoptimizationLiteral(
DeoptimizationLiteral(inlined.inlined_code_object_root));
}
}
unwinding_info_writer_.SetNumberOfInstructionBlocks( unwinding_info_writer_.SetNumberOfInstructionBlocks(
code()->InstructionBlockCount()); code()->InstructionBlockCount());
......
...@@ -552,12 +552,6 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -552,12 +552,6 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
return NoChange(); return NoChange();
} }
// Remember that we inlined this function. This needs to be called right
// after we ensure deoptimization support so that the code flusher
// does not remove the code with the deoptimization support.
int inlining_id = info_->AddInlinedFunction(
shared_info, source_positions_->GetSourcePosition(node));
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// After this point, we've made a decision to inline this function. // After this point, we've made a decision to inline this function.
// We shall not bailout from inlining if we got here. // We shall not bailout from inlining if we got here.
...@@ -571,6 +565,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -571,6 +565,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
Handle<FeedbackVector> feedback_vector; Handle<FeedbackVector> feedback_vector;
DetermineCallContext(node, context, feedback_vector); DetermineCallContext(node, context, feedback_vector);
// Remember that we inlined this function.
int inlining_id = info_->AddInlinedFunction(
shared_info, source_positions_->GetSourcePosition(node));
// Create the subgraph for the inlinee. // Create the subgraph for the inlinee.
Node* start; Node* start;
Node* end; Node* end;
......
...@@ -7952,12 +7952,6 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, ...@@ -7952,12 +7952,6 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
return false; return false;
} }
// Remember that we inlined this function. This needs to be called right
// after the EnsureDeoptimizationSupport call so that the code flusher
// does not remove the code with the deoptimization support.
int inlining_id = top_info()->AddInlinedFunction(target_info.shared_info(),
source_position());
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// After this point, we've made a decision to inline this function (so // After this point, we've made a decision to inline this function (so
// TryInline should always return true). // TryInline should always return true).
...@@ -7976,6 +7970,10 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, ...@@ -7976,6 +7970,10 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
return false; return false;
} }
// Remember that we inlined this function.
int inlining_id = top_info()->AddInlinedFunction(target_info.shared_info(),
source_position());
// Save the pending call context. Set up new one for the inlined function. // Save the pending call context. Set up new one for the inlined function.
// The function state is new-allocated because we need to delete it // The function state is new-allocated because we need to delete it
// in two different places. // in two different places.
......
...@@ -394,15 +394,6 @@ void LCodeGenBase::PopulateDeoptimizationLiteralsWithInlinedFunctions() { ...@@ -394,15 +394,6 @@ void LCodeGenBase::PopulateDeoptimizationLiteralsWithInlinedFunctions() {
} }
} }
inlined_function_count_ = deoptimization_literals_.length(); inlined_function_count_ = deoptimization_literals_.length();
// Define deoptimization literals for all unoptimized code objects of inlined
// functions. This ensures unoptimized code is kept alive by optimized code.
for (const CompilationInfo::InlinedFunctionHolder& inlined :
info()->inlined_functions()) {
if (!inlined.shared_info.is_identical_to(info()->shared_info())) {
DefineDeoptimizationLiteral(inlined.inlined_code_object_root);
}
}
} }
Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo(
......
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