Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Side by Side Diff: src/compiler/pipeline.h

Issue 1317113004: Reduce the number of entrypoints to the compiler pipeline by one. Always require caller to provide … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_PIPELINE_H_ 5 #ifndef V8_COMPILER_PIPELINE_H_
6 #define V8_COMPILER_PIPELINE_H_ 6 #define V8_COMPILER_PIPELINE_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 22 matching lines...) Expand all
33 static Handle<Code> GenerateCodeForInterpreter( 33 static Handle<Code> GenerateCodeForInterpreter(
34 Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph, 34 Isolate* isolate, CallDescriptor* call_descriptor, Graph* graph,
35 Schedule* schedule, const char* bytecode_name); 35 Schedule* schedule, const char* bytecode_name);
36 36
37 // Run the pipeline on a machine graph and generate code. If {schedule} is 37 // Run the pipeline on a machine graph and generate code. If {schedule} is
38 // {nullptr}, then compute a new schedule for code generation. 38 // {nullptr}, then compute a new schedule for code generation.
39 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, 39 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info,
40 Graph* graph, 40 Graph* graph,
41 Schedule* schedule = nullptr); 41 Schedule* schedule = nullptr);
42 42
43 // Run the pipeline on a machine graph and generate code. If {schedule} is
44 // {nullptr}, then compute a new schedule for code generation.
45 static Handle<Code> GenerateCodeForTesting(Isolate* isolate,
46 CallDescriptor* call_descriptor,
47 Graph* graph,
48 Schedule* schedule = nullptr);
49
50 // Run just the register allocator phases. 43 // Run just the register allocator phases.
51 static bool AllocateRegistersForTesting(const RegisterConfiguration* config, 44 static bool AllocateRegistersForTesting(const RegisterConfiguration* config,
52 InstructionSequence* sequence, 45 InstructionSequence* sequence,
53 bool run_verifier); 46 bool run_verifier);
54 47
55 private: 48 // Run the pipeline on a machine graph and generate code. If {schedule} is
49 // {nullptr}, then compute a new schedule for code generation.
56 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, 50 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info,
57 CallDescriptor* call_descriptor, 51 CallDescriptor* call_descriptor,
58 Graph* graph, Schedule* schedule); 52 Graph* graph,
53 Schedule* schedule = nullptr);
59 54
55 private:
60 CompilationInfo* info_; 56 CompilationInfo* info_;
61 PipelineData* data_; 57 PipelineData* data_;
62 58
63 // Helpers for executing pipeline phases. 59 // Helpers for executing pipeline phases.
64 template <typename Phase> 60 template <typename Phase>
65 void Run(); 61 void Run();
66 template <typename Phase, typename Arg0> 62 template <typename Phase, typename Arg0>
67 void Run(Arg0 arg_0); 63 void Run(Arg0 arg_0);
68 64
69 CompilationInfo* info() const { return info_; } 65 CompilationInfo* info() const { return info_; }
70 Isolate* isolate() { return info_->isolate(); } 66 Isolate* isolate() { return info_->isolate(); }
71 67
72 void BeginPhaseKind(const char* phase_kind); 68 void BeginPhaseKind(const char* phase_kind);
73 void RunPrintAndVerify(const char* phase, bool untyped = false); 69 void RunPrintAndVerify(const char* phase, bool untyped = false);
74 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); 70 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor);
75 void AllocateRegisters(const RegisterConfiguration* config, 71 void AllocateRegisters(const RegisterConfiguration* config,
76 CallDescriptor* descriptor, bool run_verifier); 72 CallDescriptor* descriptor, bool run_verifier);
77 }; 73 };
78 74
79 } // namespace compiler 75 } // namespace compiler
80 } // namespace internal 76 } // namespace internal
81 } // namespace v8 77 } // namespace v8
82 78
83 #endif // V8_COMPILER_PIPELINE_H_ 79 #endif // V8_COMPILER_PIPELINE_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698