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

[turbofan] Make broker own the is_concurrent_inlining flag

... and consult it there from the various reducers. The flag makes no
sense without the broker and the reducers already have access to the
broker, so we can avoid an additional flag per reducer.

Bug: v8:7790
Change-Id: I448050a55951b94d5313c1a79a502be906b98b25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013108
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65918}
parent a2b902dd
......@@ -865,13 +865,10 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
// tolerate the lack of a script without bytecode.
DCHECK_IMPLIES(!has_script, shared->HasBytecodeArray());
std::unique_ptr<OptimizedCompilationJob> job(
compiler::Pipeline::NewCompilationJob(
isolate, function, has_script,
FLAG_concurrent_inlining && osr_offset.IsNone()));
compiler::Pipeline::NewCompilationJob(isolate, function, has_script,
osr_offset, osr_frame));
OptimizedCompilationInfo* compilation_info = job->compilation_info();
compilation_info->SetOptimizingForOsr(osr_offset, osr_frame);
// Do not use TurboFan if we need to be able to set break points.
if (compilation_info->shared_info()->HasBreakInfo()) {
compilation_info->AbortOptimization(BailoutReason::kFunctionBeingDebugged);
......
......@@ -40,7 +40,6 @@ class BytecodeGraphBuilder {
CallFrequency const& invocation_frequency,
SourcePositionTable* source_positions, int inlining_id,
BytecodeGraphBuilderFlags flags,
JSTypeHintLowering::Flags type_hint_lowering_flags,
TickCounter* tick_counter);
// Creates a graph by visiting bytecodes.
......@@ -371,7 +370,7 @@ class BytecodeGraphBuilder {
SharedFunctionInfoRef shared_info() const { return shared_info_; }
bool should_disallow_heap_access() const {
return flags_ & BytecodeGraphBuilderFlag::kConcurrentInlining;
return broker_->is_concurrent_inlining();
}
#define DECLARE_VISIT_BYTECODE(name, ...) void Visit##name();
......@@ -438,8 +437,6 @@ class BytecodeGraphBuilder {
SourcePosition const start_position_;
BytecodeGraphBuilderFlags const flags_;
TickCounter* const tick_counter_;
static int const kBinaryOperationHintIndex = 1;
......@@ -947,9 +944,7 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
FeedbackVectorRef const& feedback_vector, BailoutId osr_offset,
JSGraph* jsgraph, CallFrequency const& invocation_frequency,
SourcePositionTable* source_positions, int inlining_id,
BytecodeGraphBuilderFlags flags,
JSTypeHintLowering::Flags type_hint_lowering_flags,
TickCounter* tick_counter)
BytecodeGraphBuilderFlags flags, TickCounter* tick_counter)
: broker_(broker),
local_zone_(local_zone),
jsgraph_(jsgraph),
......@@ -957,8 +952,11 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
shared_info_(shared_info),
feedback_vector_(feedback_vector),
invocation_frequency_(invocation_frequency),
type_hint_lowering_(broker, jsgraph, feedback_vector,
type_hint_lowering_flags),
type_hint_lowering_(
broker, jsgraph, feedback_vector,
(flags & BytecodeGraphBuilderFlag::kBailoutOnUninitialized)
? JSTypeHintLowering::kBailoutOnUninitialized
: JSTypeHintLowering::kNoFlags),
frame_state_function_info_(common()->CreateFrameStateFunctionInfo(
FrameStateType::kInterpretedFunction,
bytecode_array().parameter_count(), bytecode_array().register_count(),
......@@ -968,7 +966,7 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
bytecode_analysis_(broker_->GetBytecodeAnalysis(
bytecode_array().object(), osr_offset,
flags & BytecodeGraphBuilderFlag::kAnalyzeEnvironmentLiveness,
(flags & BytecodeGraphBuilderFlag::kConcurrentInlining)
should_disallow_heap_access()
? SerializationPolicy::kAssumeSerialized
: SerializationPolicy::kSerializeIfNeeded)),
environment_(nullptr),
......@@ -987,9 +985,8 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
state_values_cache_(jsgraph),
source_positions_(source_positions),
start_position_(shared_info.StartPosition(), inlining_id),
flags_(flags),
tick_counter_(tick_counter) {
if (flags & BytecodeGraphBuilderFlag::kConcurrentInlining) {
if (should_disallow_heap_access()) {
// With concurrent inlining on, the source position address doesn't change
// because it's been copied from the heap.
source_position_iterator_ = std::make_unique<SourcePositionTableIterator>(
......@@ -4168,17 +4165,10 @@ void BuildGraphFromBytecode(JSHeapBroker* broker, Zone* local_zone,
int inlining_id, BytecodeGraphBuilderFlags flags,
TickCounter* tick_counter) {
DCHECK(broker->IsSerializedForCompilation(shared_info, feedback_vector));
JSTypeHintLowering::Flags type_hint_lowering_flags =
JSTypeHintLowering::kNoFlags;
if (flags & BytecodeGraphBuilderFlag::kBailoutOnUninitialized) {
type_hint_lowering_flags |= JSTypeHintLowering::kBailoutOnUninitialized;
}
BytecodeGraphBuilder builder(
broker, local_zone, broker->target_native_context(), shared_info,
feedback_vector, osr_offset, jsgraph, invocation_frequency,
source_positions, inlining_id, flags, type_hint_lowering_flags,
tick_counter);
source_positions, inlining_id, flags, tick_counter);
builder.CreateGraph();
}
......
......@@ -33,7 +33,6 @@ enum class BytecodeGraphBuilderFlag : uint8_t {
// bytecode analysis.
kAnalyzeEnvironmentLiveness = 1 << 1,
kBailoutOnUninitialized = 1 << 2,
kConcurrentInlining = 1 << 3,
};
using BytecodeGraphBuilderFlags = base::Flags<BytecodeGraphBuilderFlag>;
......
......@@ -2040,6 +2040,10 @@ TNode<Object> PromiseBuiltinReducerAssembler::ReducePromiseConstructor(
#undef _
bool JSCallReducer::should_disallow_heap_access() const {
return broker_->is_concurrent_inlining();
}
Reduction JSCallReducer::ReplaceWithSubgraph(JSCallReducerAssembler* gasm,
Node* subgraph) {
// TODO(jgruber): Consider a less fiddly way of integrating the new subgraph
......
......@@ -43,7 +43,6 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer {
enum Flag {
kNoFlags = 0u,
kBailoutOnUninitialized = 1u << 0,
kConcurrentInlining = 1u << 1
};
using Flags = base::Flags<Flag>;
......@@ -230,10 +229,7 @@ class V8_EXPORT_PRIVATE JSCallReducer final : public AdvancedReducer {
SimplifiedOperatorBuilder* simplified() const;
Flags flags() const { return flags_; }
CompilationDependencies* dependencies() const { return dependencies_; }
bool should_disallow_heap_access() const {
return flags() & kConcurrentInlining;
}
bool should_disallow_heap_access() const;
JSGraph* const jsgraph_;
JSHeapBroker* const broker_;
......
......@@ -4602,7 +4602,7 @@ FeedbackSlotKind JSHeapBroker::GetFeedbackSlotKind(
}
bool JSHeapBroker::FeedbackIsInsufficient(FeedbackSource const& source) const {
return (is_concurrent_inlining_)
return is_concurrent_inlining_
? GetFeedback(source).IsInsufficient()
: FeedbackNexus(source.vector, source.slot).IsUninitialized();
}
......@@ -4801,8 +4801,8 @@ ProcessedFeedback const& JSHeapBroker::ReadFeedbackForCall(
BinaryOperationHint JSHeapBroker::GetFeedbackForBinaryOperation(
FeedbackSource const& source) {
ProcessedFeedback const& feedback =
(is_concurrent_inlining_) ? GetFeedback(source)
: ProcessFeedbackForBinaryOperation(source);
is_concurrent_inlining_ ? GetFeedback(source)
: ProcessFeedbackForBinaryOperation(source);
return feedback.IsInsufficient() ? BinaryOperationHint::kNone
: feedback.AsBinaryOperation().value();
}
......@@ -4810,14 +4810,14 @@ BinaryOperationHint JSHeapBroker::GetFeedbackForBinaryOperation(
CompareOperationHint JSHeapBroker::GetFeedbackForCompareOperation(
FeedbackSource const& source) {
ProcessedFeedback const& feedback =
(is_concurrent_inlining_) ? GetFeedback(source)
: ProcessFeedbackForCompareOperation(source);
is_concurrent_inlining_ ? GetFeedback(source)
: ProcessFeedbackForCompareOperation(source);
return feedback.IsInsufficient() ? CompareOperationHint::kNone
: feedback.AsCompareOperation().value();
}
ForInHint JSHeapBroker::GetFeedbackForForIn(FeedbackSource const& source) {
ProcessedFeedback const& feedback = (is_concurrent_inlining_)
ProcessedFeedback const& feedback = is_concurrent_inlining_
? GetFeedback(source)
: ProcessFeedbackForForIn(source);
return feedback.IsInsufficient() ? ForInHint::kNone
......@@ -4827,46 +4827,46 @@ ForInHint JSHeapBroker::GetFeedbackForForIn(FeedbackSource const& source) {
ProcessedFeedback const& JSHeapBroker::GetFeedbackForPropertyAccess(
FeedbackSource const& source, AccessMode mode,
base::Optional<NameRef> static_name) {
return (is_concurrent_inlining_)
return is_concurrent_inlining_
? GetFeedback(source)
: ProcessFeedbackForPropertyAccess(source, mode, static_name);
}
ProcessedFeedback const& JSHeapBroker::GetFeedbackForInstanceOf(
FeedbackSource const& source) {
return (is_concurrent_inlining_) ? GetFeedback(source)
: ProcessFeedbackForInstanceOf(source);
return is_concurrent_inlining_ ? GetFeedback(source)
: ProcessFeedbackForInstanceOf(source);
}
ProcessedFeedback const& JSHeapBroker::GetFeedbackForCall(
FeedbackSource const& source) {
return (is_concurrent_inlining_) ? GetFeedback(source)
: ProcessFeedbackForCall(source);
return is_concurrent_inlining_ ? GetFeedback(source)
: ProcessFeedbackForCall(source);
}
ProcessedFeedback const& JSHeapBroker::GetFeedbackForGlobalAccess(
FeedbackSource const& source) {
return (is_concurrent_inlining_) ? GetFeedback(source)
: ProcessFeedbackForGlobalAccess(source);
return is_concurrent_inlining_ ? GetFeedback(source)
: ProcessFeedbackForGlobalAccess(source);
}
ProcessedFeedback const& JSHeapBroker::GetFeedbackForArrayOrObjectLiteral(
FeedbackSource const& source) {
return (is_concurrent_inlining_)
return is_concurrent_inlining_
? GetFeedback(source)
: ProcessFeedbackForArrayOrObjectLiteral(source);
}
ProcessedFeedback const& JSHeapBroker::GetFeedbackForRegExpLiteral(
FeedbackSource const& source) {
return (is_concurrent_inlining_) ? GetFeedback(source)
: ProcessFeedbackForRegExpLiteral(source);
return is_concurrent_inlining_ ? GetFeedback(source)
: ProcessFeedbackForRegExpLiteral(source);
}
ProcessedFeedback const& JSHeapBroker::GetFeedbackForTemplateObject(
FeedbackSource const& source) {
return (is_concurrent_inlining_) ? GetFeedback(source)
: ProcessFeedbackForTemplateObject(source);
return is_concurrent_inlining_ ? GetFeedback(source)
: ProcessFeedbackForTemplateObject(source);
}
ProcessedFeedback const& JSHeapBroker::ProcessFeedbackForArrayOrObjectLiteral(
......
......@@ -88,6 +88,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker {
Isolate* isolate() const { return isolate_; }
Zone* zone() const { return zone_; }
bool tracing_enabled() const { return tracing_enabled_; }
bool is_concurrent_inlining() const { return is_concurrent_inlining_; }
enum BrokerMode { kDisabled, kSerializing, kSerialized, kRetired };
BrokerMode mode() const { return mode_; }
......
......@@ -127,7 +127,7 @@ JSInliningHeuristic::Candidate JSInliningHeuristic::CollectFunctions(
}
Reduction JSInliningHeuristic::Reduce(Node* node) {
DisallowHeapAccessIf no_heap_acess(info_->is_concurrent_inlining());
DisallowHeapAccessIf no_heap_acess(broker()->is_concurrent_inlining());
if (!IrOpcode::IsInlineeOpcode(node->opcode())) return NoChange();
......@@ -222,7 +222,7 @@ Reduction JSInliningHeuristic::Reduce(Node* node) {
}
void JSInliningHeuristic::Finalize() {
DisallowHeapAccessIf no_heap_acess(info_->is_concurrent_inlining());
DisallowHeapAccessIf no_heap_acess(broker()->is_concurrent_inlining());
if (candidates_.empty()) return; // Nothing to do without candidates.
if (FLAG_trace_turbo_inlining) PrintCandidates();
......
......@@ -22,7 +22,6 @@ class JSInliningHeuristic final : public AdvancedReducer {
candidates_(local_zone),
seen_(local_zone),
source_positions_(source_positions),
info_(info),
jsgraph_(jsgraph),
broker_(broker) {}
......@@ -93,7 +92,6 @@ class JSInliningHeuristic final : public AdvancedReducer {
Candidates candidates_;
ZoneSet<NodeId> seen_;
SourcePositionTable* source_positions_;
OptimizedCompilationInfo* info_;
JSGraph* const jsgraph_;
JSHeapBroker* const broker_;
int total_inlined_bytecode_size_ = 0;
......
......@@ -419,7 +419,7 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
// always hold true.
CHECK(shared_info->is_compiled());
if (!info_->is_concurrent_inlining() &&
if (!broker()->is_concurrent_inlining() &&
info_->is_source_positions_enabled()) {
SharedFunctionInfo::EnsureSourcePositionsAvailable(isolate(),
shared_info->object());
......@@ -458,9 +458,6 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
if (info_->is_bailout_on_uninitialized()) {
flags |= BytecodeGraphBuilderFlag::kBailoutOnUninitialized;
}
if (info_->is_concurrent_inlining()) {
flags |= BytecodeGraphBuilderFlag::kConcurrentInlining;
}
{
CallFrequency frequency = call.frequency();
BuildGraphFromBytecode(broker(), zone(), *shared_info, feedback_vector,
......
......@@ -9,6 +9,7 @@
#include "src/codegen/code-factory.h"
#include "src/compiler/access-builder.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/linkage.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
......@@ -22,14 +23,11 @@ namespace internal {
namespace compiler {
JSIntrinsicLowering::JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph,
JSHeapBroker* broker, Flags flags)
: AdvancedReducer(editor),
jsgraph_(jsgraph),
broker_(broker),
flags_(flags) {}
JSHeapBroker* broker)
: AdvancedReducer(editor), jsgraph_(jsgraph), broker_(broker) {}
Reduction JSIntrinsicLowering::Reduce(Node* node) {
DisallowHeapAccessIf no_heap_access(flags_ & kConcurrentInlining);
DisallowHeapAccessIf no_heap_access(broker()->is_concurrent_inlining());
if (node->opcode() != IrOpcode::kJSCallRuntime) return NoChange();
const Runtime::Function* const f =
......
......@@ -31,12 +31,7 @@ class SimplifiedOperatorBuilder;
class V8_EXPORT_PRIVATE JSIntrinsicLowering final
: public NON_EXPORTED_BASE(AdvancedReducer) {
public:
// Flags that control the mode of operation.
enum Flag { kNoFlags = 0u, kConcurrentInlining = 1u << 0 };
using Flags = base::Flags<Flag>;
JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, JSHeapBroker* broker,
Flags flags);
JSIntrinsicLowering(Editor* editor, JSGraph* jsgraph, JSHeapBroker* broker);
~JSIntrinsicLowering() final = default;
const char* reducer_name() const override { return "JSIntrinsicLowering"; }
......@@ -95,7 +90,6 @@ class V8_EXPORT_PRIVATE JSIntrinsicLowering final
JSGraph* const jsgraph_;
JSHeapBroker* const broker_;
Flags const flags_;
};
} // namespace compiler
......
......@@ -53,6 +53,10 @@ bool HasOnlyJSArrayMaps(JSHeapBroker* broker,
} // namespace
bool JSNativeContextSpecialization::should_disallow_heap_access() const {
return broker()->is_concurrent_inlining();
}
JSNativeContextSpecialization::JSNativeContextSpecialization(
Editor* editor, JSGraph* jsgraph, JSHeapBroker* broker, Flags flags,
CompilationDependencies* dependencies, Zone* zone, Zone* shared_zone)
......
......@@ -47,7 +47,6 @@ class V8_EXPORT_PRIVATE JSNativeContextSpecialization final
enum Flag {
kNoFlags = 0u,
kBailoutOnUninitialized = 1u << 0,
kConcurrentInlining = 1u << 1
};
using Flags = base::Flags<Flag>;
......@@ -251,10 +250,7 @@ class V8_EXPORT_PRIVATE JSNativeContextSpecialization final
CompilationDependencies* dependencies() const { return dependencies_; }
Zone* zone() const { return zone_; }
Zone* shared_zone() const { return shared_zone_; }
bool should_disallow_heap_access() const {
return flags() & kConcurrentInlining;
}
bool should_disallow_heap_access() const;
JSGraph* const jsgraph_;
JSHeapBroker* const broker_;
......
......@@ -978,8 +978,8 @@ class PipelineCompilationJob final : public OptimizedCompilationJob {
public:
PipelineCompilationJob(Isolate* isolate,
Handle<SharedFunctionInfo> shared_info,
Handle<JSFunction> function,
bool is_concurrent_inlining);
Handle<JSFunction> function, BailoutId osr_offset,
JavaScriptFrame* osr_frame);
~PipelineCompilationJob() final;
protected:
......@@ -1004,7 +1004,8 @@ class PipelineCompilationJob final : public OptimizedCompilationJob {
PipelineCompilationJob::PipelineCompilationJob(
Isolate* isolate, Handle<SharedFunctionInfo> shared_info,
Handle<JSFunction> function, bool is_concurrent_inlining)
Handle<JSFunction> function, BailoutId osr_offset,
JavaScriptFrame* osr_frame)
// Note that the OptimizedCompilationInfo is not initialized at the time
// we pass it to the CompilationJob constructor, but it is not
// dereferenced there.
......@@ -1017,18 +1018,20 @@ PipelineCompilationJob::PipelineCompilationJob(
handle(Script::cast(shared_info->script()), isolate),
compilation_info(), function->GetIsolate(), &zone_stats_)),
data_(&zone_stats_, function->GetIsolate(), compilation_info(),
pipeline_statistics_.get(), is_concurrent_inlining),
pipeline_statistics_.get(),
FLAG_concurrent_inlining && osr_offset.IsNone()),
pipeline_(&data_),
linkage_(nullptr) {}
PipelineCompilationJob::~PipelineCompilationJob() {
linkage_(nullptr) {
compilation_info_.SetOptimizingForOsr(osr_offset, osr_frame);
}
PipelineCompilationJob::~PipelineCompilationJob() {}
namespace {
// Ensure that the RuntimeStats table is set on the PipelineData for duration of
// the job phase and unset immediately afterwards. Each job needs to set the
// correct RuntimeCallStats table depending on whether it is running on a
// background or foreground thread.
// Ensure that the RuntimeStats table is set on the PipelineData for
// duration of the job phase and unset immediately afterwards. Each job
// needs to set the correct RuntimeCallStats table depending on whether it
// is running on a background or foreground thread.
class PipelineJobScope {
public:
PipelineJobScope(PipelineData* data, RuntimeCallStats* stats) : data_(data) {
......@@ -1062,9 +1065,6 @@ PipelineCompilationJob::Status PipelineCompilationJob::PrepareJobImpl(
if (FLAG_turbo_inlining) {
compilation_info()->MarkAsInliningEnabled();
}
if (FLAG_concurrent_inlining && !compilation_info()->is_osr()) {
compilation_info()->MarkAsConcurrentInlining();
}
// This is the bottleneck for computing and setting poisoning level in the
// optimizing compiler.
......@@ -1113,7 +1113,7 @@ PipelineCompilationJob::Status PipelineCompilationJob::PrepareJobImpl(
pipeline_.Serialize();
if (!compilation_info()->is_concurrent_inlining()) {
if (!data_.broker()->is_concurrent_inlining()) {
if (!pipeline_.CreateGraph()) {
CHECK(!isolate->has_pending_exception());
return AbortOptimization(BailoutReason::kGraphBuildingFailed);
......@@ -1128,7 +1128,7 @@ PipelineCompilationJob::Status PipelineCompilationJob::ExecuteJobImpl(
// Ensure that the RuntimeCallStats table is only available during execution
// and not during finalization as that might be on a different thread.
PipelineJobScope scope(&data_, stats);
if (compilation_info()->is_concurrent_inlining()) {
if (data_.broker()->is_concurrent_inlining()) {
if (!pipeline_.CreateGraph()) {
return AbortOptimization(BailoutReason::kGraphBuildingFailed);
}
......@@ -1344,9 +1344,6 @@ struct GraphBuilderPhase {
if (data->info()->is_bailout_on_uninitialized()) {
flags |= BytecodeGraphBuilderFlag::kBailoutOnUninitialized;
}
if (data->info()->is_concurrent_inlining()) {
flags |= BytecodeGraphBuilderFlag::kConcurrentInlining;
}
JSFunctionRef closure(data->broker(), data->info()->closure());
CallFrequency frequency(1.0f);
......@@ -1375,9 +1372,6 @@ struct InliningPhase {
if (data->info()->is_bailout_on_uninitialized()) {
call_reducer_flags |= JSCallReducer::kBailoutOnUninitialized;
}
if (data->info()->is_concurrent_inlining()) {
call_reducer_flags |= JSCallReducer::kConcurrentInlining;
}
JSCallReducer call_reducer(&graph_reducer, data->jsgraph(), data->broker(),
temp_zone, call_reducer_flags,
data->dependencies());
......@@ -1392,9 +1386,6 @@ struct InliningPhase {
if (data->info()->is_bailout_on_uninitialized()) {
flags |= JSNativeContextSpecialization::kBailoutOnUninitialized;
}
if (data->info()->is_concurrent_inlining()) {
flags |= JSNativeContextSpecialization::kConcurrentInlining;
}
// Passing the OptimizedCompilationInfo's shared zone here as
// JSNativeContextSpecialization allocates out-of-heap objects
// that need to live until code generation.
......@@ -1405,14 +1396,8 @@ struct InliningPhase {
temp_zone, data->info(), data->jsgraph(),
data->broker(), data->source_positions());
JSIntrinsicLowering::Flags intrinsic_lowering_flags =
JSIntrinsicLowering::kNoFlags;
if (data->info()->is_concurrent_inlining()) {
intrinsic_lowering_flags |= JSIntrinsicLowering::kConcurrentInlining;
}
JSIntrinsicLowering intrinsic_lowering(&graph_reducer, data->jsgraph(),
data->broker(),
intrinsic_lowering_flags);
data->broker());
AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &checkpoint_elimination);
AddReducer(data, &graph_reducer, &common_reducer);
......@@ -2388,7 +2373,7 @@ void PipelineImpl::Serialize() {
}
data->broker()->SetTargetNativeContextRef(data->native_context());
if (data->info()->is_concurrent_inlining()) {
if (data->broker()->is_concurrent_inlining()) {
Run<HeapBrokerInitializationPhase>();
Run<SerializationPhase>();
data->broker()->StopSerializing();
......@@ -2428,7 +2413,7 @@ bool PipelineImpl::CreateGraph() {
// Run the type-sensitive lowerings and optimizations on the graph.
{
if (!data->info()->is_concurrent_inlining()) {
if (!data->broker()->is_concurrent_inlining()) {
Run<HeapBrokerInitializationPhase>();
Run<CopyMetadataForConcurrentCompilePhase>();
data->broker()->StopSerializing();
......@@ -2825,12 +2810,9 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
std::unique_ptr<PipelineStatistics> pipeline_statistics(
CreatePipelineStatistics(Handle<Script>::null(), info, isolate,
&zone_stats));
if (i::FLAG_concurrent_inlining) {
info->MarkAsConcurrentInlining();
}
PipelineData data(&zone_stats, isolate, info, pipeline_statistics.get(),
info->is_concurrent_inlining());
i::FLAG_concurrent_inlining);
PipelineImpl pipeline(&data);
Linkage linkage(Linkage::ComputeIncoming(data.instruction_zone(), info));
......@@ -2893,11 +2875,11 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
// static
std::unique_ptr<OptimizedCompilationJob> Pipeline::NewCompilationJob(
Isolate* isolate, Handle<JSFunction> function, bool has_script,
bool is_concurrent_inlining) {
BailoutId osr_offset, JavaScriptFrame* osr_frame) {
Handle<SharedFunctionInfo> shared =
handle(function->shared(), function->GetIsolate());
return std::make_unique<PipelineCompilationJob>(isolate, shared, function,
is_concurrent_inlining);
osr_offset, osr_frame);
}
// static
......
......@@ -46,7 +46,8 @@ class Pipeline : public AllStatic {
// Returns a new compilation job for the given JavaScript function.
static std::unique_ptr<OptimizedCompilationJob> NewCompilationJob(
Isolate* isolate, Handle<JSFunction> function, bool has_script,
bool is_concurrent_inlining);
BailoutId osr_offset = BailoutId::None(),
JavaScriptFrame* osr_frame = nullptr);
// Run the pipeline for the WebAssembly compilation info.
static void GenerateCodeForWasmFunction(
......
......@@ -37,8 +37,7 @@ class JSIntrinsicLoweringTest : public GraphTest {
&machine);
// TODO(titzer): mock the GraphReducer here for better unit testing.
GraphReducer graph_reducer(zone(), graph(), tick_counter());
JSIntrinsicLowering reducer(&graph_reducer, &jsgraph, broker(),
JSIntrinsicLowering::kNoFlags);
JSIntrinsicLowering reducer(&graph_reducer, &jsgraph, broker());
return reducer.Reduce(node);
}
......
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