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