| Index: src/compiler/pipeline.h
|
| diff --git a/src/compiler/pipeline.h b/src/compiler/pipeline.h
|
| index 911f283f5e457accef91e24c4f9b3ea8e162bcee..6a0253611b73ab6985f8b90e80061ede4167f0ec 100644
|
| --- a/src/compiler/pipeline.h
|
| +++ b/src/compiler/pipeline.h
|
| @@ -15,7 +15,6 @@ namespace internal {
|
| class CompilationInfo;
|
| class OptimizedCompileJob;
|
| class RegisterConfiguration;
|
| -class Zone;
|
|
|
| namespace compiler {
|
|
|
| @@ -26,11 +25,19 @@ class Linkage;
|
| class PipelineData;
|
| class Schedule;
|
| class SourcePositionTable;
|
| -class ZonePool;
|
|
|
| class Pipeline {
|
| public:
|
| - explicit Pipeline(CompilationInfo* info) : info_(info), data_(nullptr) {}
|
| + explicit Pipeline(PipelineData* data) : data_(data) {}
|
| +
|
| + // Run the graph creation and initial optimization passes.
|
| + bool CreateGraph();
|
| +
|
| + // Run the concurrent optimization passes.
|
| + bool OptimizeGraph(Linkage* linkage);
|
| +
|
| + // Perform the actual code generation and return handle to a code object.
|
| + Handle<Code> GenerateCode(Linkage* linkage);
|
|
|
| // Run the entire pipeline and generate a handle to a code object.
|
| Handle<Code> GenerateCode();
|
| @@ -43,6 +50,10 @@ class Pipeline {
|
| Code::Flags flags,
|
| const char* debug_name);
|
|
|
| + // Run the entire pipeline and generate a handle to a code object suitable for
|
| + // testing.
|
| + static Handle<Code> GenerateCodeForTesting(CompilationInfo* info);
|
| +
|
| // Run the pipeline on a machine graph and generate code. If {schedule} is
|
| // {nullptr}, then compute a new schedule for code generation.
|
| static Handle<Code> GenerateCodeForTesting(CompilationInfo* info,
|
| @@ -64,11 +75,13 @@ class Pipeline {
|
| // Returns a new compilation job for the given compilation info.
|
| static OptimizedCompileJob* NewCompilationJob(CompilationInfo* info);
|
|
|
| - void InitializeWasmCompilation(Zone* pipeline_zone, ZonePool* zone_pool,
|
| - Graph* graph,
|
| - SourcePositionTable* source_positions);
|
| - bool ExecuteWasmCompilation(CallDescriptor* descriptor);
|
| - Handle<Code> FinalizeWasmCompilation(CallDescriptor* descriptor);
|
| + // Returns a new compilation job for the WebAssembly compilation info.
|
| + static OptimizedCompileJob* NewWasmCompilationJob(
|
| + CompilationInfo* info, Graph* graph, CallDescriptor* descriptor,
|
| + SourcePositionTable* source_positions);
|
| +
|
| + // TODO(mstarzinger, bmeurer): This shouldn't be public!
|
| + bool ScheduleAndSelectInstructions(Linkage* linkage);
|
|
|
| private:
|
| // Helpers for executing pipeline phases.
|
| @@ -80,17 +93,16 @@ class Pipeline {
|
| void Run(Arg0 arg_0, Arg1 arg_1);
|
|
|
| void BeginPhaseKind(const char* phase_kind);
|
| + void EndPhaseKind();
|
| void RunPrintAndVerify(const char* phase, bool untyped = false);
|
| + Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor);
|
| void AllocateRegisters(const RegisterConfiguration* config,
|
| CallDescriptor* descriptor, bool run_verifier);
|
| - bool ScheduleGraph(CallDescriptor* call_descriptor);
|
| - Handle<Code> GenerateCode(CallDescriptor* descriptor);
|
| - Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor);
|
| - CompilationInfo* info() const { return info_; }
|
| +
|
| + CompilationInfo* info() const;
|
| Isolate* isolate() const;
|
|
|
| - CompilationInfo* const info_;
|
| - PipelineData* data_;
|
| + PipelineData* const data_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Pipeline);
|
| };
|
|
|