V8 Project
pipeline.h
Go to the documentation of this file.
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 namespace v8 {
16 namespace internal {
17 namespace compiler {
18 
19 // Clients of this interface shouldn't depend on lots of compiler internals.
20 class Graph;
21 class Schedule;
22 class SourcePositionTable;
23 class Linkage;
24 
25 class Pipeline {
26  public:
28 
29  // Run the entire pipeline and generate a handle to a code object.
31 
32  // Run the pipeline on a machine graph and generate code. If {schedule}
33  // is {NULL}, then compute a new schedule for code generation.
35  Schedule* schedule = NULL);
36 
37  static inline bool SupportedBackend() { return V8_TURBOFAN_BACKEND != 0; }
38  static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; }
39 
40  static void SetUp();
41  static void TearDown();
42 
43  private:
45 
46  CompilationInfo* info() const { return info_; }
47  Isolate* isolate() { return info_->isolate(); }
48  Zone* zone() { return info_->zone(); }
49 
51  void VerifyAndPrintGraph(Graph* graph, const char* phase);
52  Handle<Code> GenerateCode(Linkage* linkage, Graph* graph, Schedule* schedule,
53  SourcePositionTable* source_positions);
54 };
55 }
56 }
57 } // namespace v8::internal::compiler
58 
59 #endif // V8_COMPILER_PIPELINE_H_
Isolate * isolate() const
Definition: compiler.h:96
Handle< Code > GenerateCode()
Definition: pipeline.cc:166
Pipeline(CompilationInfo *info)
Definition: pipeline.h:27
CompilationInfo * info() const
Definition: pipeline.h:46
static bool SupportedBackend()
Definition: pipeline.h:37
Schedule * ComputeSchedule(Graph *graph)
Definition: pipeline.cc:347
Handle< Code > GenerateCodeForMachineGraph(Linkage *linkage, Graph *graph, Schedule *schedule=NULL)
Definition: pipeline.cc:356
CompilationInfo * info_
Definition: pipeline.h:44
void VerifyAndPrintGraph(Graph *graph, const char *phase)
Definition: pipeline.cc:91
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define V8_TURBOFAN_TARGET
Definition: globals.h:37
#define V8_TURBOFAN_BACKEND
Definition: globals.h:32
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20