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

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

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_PIPELINE_H_
6 #define V8_COMPILER_PIPELINE_H_
7
8 #include "src/v8.h"
9
10 #include "src/compiler.h"
11
12 // Note: TODO(turbofan) implies a performance improvement opportunity,
13 // and TODO(name) implies an incomplete implementation
14
15 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || \
16 V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM
17 #define V8_TURBOFAN_TARGET 1
18 #else
19 #define V8_TURBOFAN_TARGET 0
20 #endif
21
22 namespace v8 {
23 namespace internal {
24 namespace compiler {
25
26 // Clients of this interface shouldn't depend on lots of compiler internals.
27 class CallDescriptor;
28 class Graph;
29 class Schedule;
30 class SourcePositionTable;
31 class Linkage;
32
33 class Pipeline {
34 public:
35 explicit Pipeline(CompilationInfo* info) : info_(info) { }
36
37 // Run the entire pipeline and generate a handle to a code object.
38 Handle<Code> GenerateCode();
39
40 // Run the pipeline on a machine graph and generate code. If {schedule}
41 // is {NULL}, then compute a new schedule for code generation.
42 Handle<Code> GenerateCodeForMachineGraph(Linkage* linkage, Graph* graph,
43 Schedule* schedule = NULL);
44
45 CompilationInfo* info() const { return info_; }
46 Zone* zone() { return info_->zone(); }
47 Isolate* isolate() { return info_->isolate(); }
48
49 static inline bool SupportedTarget() {
50 return V8_TURBOFAN_TARGET != 0;
51 }
52
53 static inline bool VerifyGraphs() {
54 #ifdef DEBUG
55 return true;
56 #else
57 return FLAG_turbo_verify;
58 #endif
59 }
60
61 private:
62 CompilationInfo* info_;
63
64 Schedule* ComputeSchedule(Graph* graph);
65 void VerifyAndPrintGraph(Graph* graph, const char* phase);
66 Handle<Code> GenerateCode(Linkage* linkage, Graph* graph, Schedule* schedule,
67 SourcePositionTable* source_positions);
68 };
69
70 } } } // namespace v8::internal::compiler
71
72 #endif // V8_COMPILER_PIPELINE_H_
OLDNEW
« no previous file with comments | « src/compiler/phi-reducer.h ('k') | src/compiler/pipeline.cc » ('j') | src/lithium-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698