Commit aea2db16 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Further graph builder cleanups

- Rename (and negate) "stack_check" to the more descriptive
  "skip_first_stack_check".
- Pass call frequency by value rather than mutable(!) reference.
- Embed some things directly into BytecodeGraphBuilder,
  instead of stack-allocating them and then storing a pointer.
- Don't pass things to OsrIteratorState that it can already access via
  the graph builder parameter.

Change-Id: Id852df1ce521a6eefb6047cf76a0882a4c6e95b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1587375
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61072}
parent c76f377a
This diff is collapsed.
...@@ -26,10 +26,10 @@ class SourcePositionTable; ...@@ -26,10 +26,10 @@ class SourcePositionTable;
void BuildGraphFromBytecode( void BuildGraphFromBytecode(
Zone* local_zone, Handle<BytecodeArray> bytecode_array, Zone* local_zone, Handle<BytecodeArray> bytecode_array,
Handle<SharedFunctionInfo> shared, Handle<FeedbackVector> feedback_vector, Handle<SharedFunctionInfo> shared, Handle<FeedbackVector> feedback_vector,
BailoutId osr_offset, JSGraph* jsgraph, CallFrequency& invocation_frequency, BailoutId osr_offset, JSGraph* jsgraph, CallFrequency invocation_frequency,
SourcePositionTable* source_positions, Handle<Context> native_context, SourcePositionTable* source_positions, Handle<Context> native_context,
int inlining_id, JSTypeHintLowering::Flags flags, bool stack_check, int inlining_id, JSTypeHintLowering::Flags flags,
bool analyze_environment_liveness); bool skip_first_stack_check, bool analyze_environment_liveness);
} // namespace compiler } // namespace compiler
} // namespace internal } // namespace internal
......
...@@ -492,11 +492,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -492,11 +492,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
if (info_->is_bailout_on_uninitialized()) { if (info_->is_bailout_on_uninitialized()) {
flags |= JSTypeHintLowering::kBailoutOnUninitialized; flags |= JSTypeHintLowering::kBailoutOnUninitialized;
} }
CallFrequency frequency = call.frequency();
BuildGraphFromBytecode( BuildGraphFromBytecode(
zone(), bytecode_array, shared_info, feedback_vector, BailoutId::None(), zone(), bytecode_array, shared_info, feedback_vector, BailoutId::None(),
jsgraph(), frequency, source_positions_, native_context(), inlining_id, jsgraph(), call.frequency(), source_positions_, native_context(),
flags, false, info_->is_analyze_environment_liveness()); inlining_id, flags, true, info_->is_analyze_environment_liveness());
// Extract the inlinee start/end nodes. // Extract the inlinee start/end nodes.
start = graph()->start(); start = graph()->start();
......
...@@ -1065,13 +1065,12 @@ struct GraphBuilderPhase { ...@@ -1065,13 +1065,12 @@ struct GraphBuilderPhase {
if (data->info()->is_bailout_on_uninitialized()) { if (data->info()->is_bailout_on_uninitialized()) {
flags |= JSTypeHintLowering::kBailoutOnUninitialized; flags |= JSTypeHintLowering::kBailoutOnUninitialized;
} }
CallFrequency frequency = CallFrequency(1.0f);
BuildGraphFromBytecode( BuildGraphFromBytecode(
temp_zone, data->info()->bytecode_array(), data->info()->shared_info(), temp_zone, data->info()->bytecode_array(), data->info()->shared_info(),
handle(data->info()->closure()->feedback_vector(), data->isolate()), handle(data->info()->closure()->feedback_vector(), data->isolate()),
data->info()->osr_offset(), data->jsgraph(), frequency, data->info()->osr_offset(), data->jsgraph(), CallFrequency(1.0f),
data->source_positions(), data->native_context(), data->source_positions(), data->native_context(),
SourcePosition::kNotInlined, flags, true, SourcePosition::kNotInlined, flags, false,
data->info()->is_analyze_environment_liveness()); data->info()->is_analyze_environment_liveness());
} }
}; };
......
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