Commit f9ea078a authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Don't run graph verifier on scheduled graphs.

Fully scheduled graphs built by the RawMachineAssembler are inherently
not schedulable, they are missing effect and control dependencies, which
makes them not pass the graph verifier either. They do however pass the
schedule verifier.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32715}
parent 35452afa
...@@ -50,7 +50,6 @@ Handle<Code> InterpreterAssembler::GenerateCode() { ...@@ -50,7 +50,6 @@ Handle<Code> InterpreterAssembler::GenerateCode() {
const char* bytecode_name = interpreter::Bytecodes::ToString(bytecode_); const char* bytecode_name = interpreter::Bytecodes::ToString(bytecode_);
Schedule* schedule = raw_assembler_->Export(); Schedule* schedule = raw_assembler_->Export();
// TODO(rmcilroy): use a non-testing code generator.
Handle<Code> code = Pipeline::GenerateCodeForCodeStub( Handle<Code> code = Pipeline::GenerateCodeForCodeStub(
isolate(), raw_assembler_->call_descriptor(), graph(), schedule, isolate(), raw_assembler_->call_descriptor(), graph(), schedule,
Code::STUB, bytecode_name); Code::STUB, bytecode_name);
......
...@@ -1227,6 +1227,11 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, ...@@ -1227,6 +1227,11 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool)); pipeline_statistics.Reset(new PipelineStatistics(&info, &zone_pool));
pipeline_statistics->BeginPhaseKind("interpreter handler codegen"); pipeline_statistics->BeginPhaseKind("interpreter handler codegen");
} }
Pipeline pipeline(&info);
pipeline.data_ = &data;
DCHECK_NOT_NULL(data.schedule());
if (FLAG_trace_turbo) { if (FLAG_trace_turbo) {
FILE* json_file = OpenVisualizerLogFile(&info, NULL, "json", "w+"); FILE* json_file = OpenVisualizerLogFile(&info, NULL, "json", "w+");
if (json_file != nullptr) { if (json_file != nullptr) {
...@@ -1235,11 +1240,9 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, ...@@ -1235,11 +1240,9 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
<< "\", \"source\":\"\",\n\"phases\":["; << "\", \"source\":\"\",\n\"phases\":[";
fclose(json_file); fclose(json_file);
} }
pipeline.Run<PrintGraphPhase>("Machine");
} }
Pipeline pipeline(&info);
pipeline.data_ = &data;
pipeline.RunPrintAndVerify("Machine", true);
return pipeline.ScheduleAndGenerateCode(call_descriptor); return pipeline.ScheduleAndGenerateCode(call_descriptor);
} }
......
...@@ -30,8 +30,8 @@ class Pipeline { ...@@ -30,8 +30,8 @@ class Pipeline {
// Run the entire pipeline and generate a handle to a code object. // Run the entire pipeline and generate a handle to a code object.
Handle<Code> GenerateCode(); Handle<Code> GenerateCode();
// Run the pipeline on an code stub machine graph and generate code. A valid // Run the pipeline on a machine graph and generate code. The {schedule} must
// schedule must be provided. // be valid, hence the given {graph} does not need to be schedulable.
static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate, static Handle<Code> GenerateCodeForCodeStub(Isolate* isolate,
CallDescriptor* call_descriptor, CallDescriptor* call_descriptor,
Graph* graph, Schedule* schedule, Graph* graph, Schedule* schedule,
......
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