| OLD | NEW |
| 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 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| 11 | 11 |
| 12 // Note: TODO(turbofan) implies a performance improvement opportunity, | 12 // Note: TODO(turbofan) implies a performance improvement opportunity, |
| 13 // and TODO(name) implies an incomplete implementation | 13 // and TODO(name) implies an incomplete implementation |
| 14 | 14 |
| 15 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 || \ | 15 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM |
| 16 V8_TARGET_ARCH_ARM | |
| 17 #ifndef _WIN64 | 16 #ifndef _WIN64 |
| 18 #define V8_TURBOFAN_TARGET 1 | 17 #define V8_TURBOFAN_TARGET 1 |
| 19 #else | 18 #else |
| 20 #define V8_TURBOFAN_TARGET 0 | 19 #define V8_TURBOFAN_TARGET 0 |
| 21 #endif | 20 #endif |
| 22 #else | 21 #else |
| 23 #define V8_TURBOFAN_TARGET 0 | 22 #define V8_TURBOFAN_TARGET 0 |
| 24 #endif | 23 #endif |
| 25 | 24 |
| 26 namespace v8 { | 25 namespace v8 { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 43 | 42 |
| 44 // Run the pipeline on a machine graph and generate code. If {schedule} | 43 // Run the pipeline on a machine graph and generate code. If {schedule} |
| 45 // is {NULL}, then compute a new schedule for code generation. | 44 // is {NULL}, then compute a new schedule for code generation. |
| 46 Handle<Code> GenerateCodeForMachineGraph(Linkage* linkage, Graph* graph, | 45 Handle<Code> GenerateCodeForMachineGraph(Linkage* linkage, Graph* graph, |
| 47 Schedule* schedule = NULL); | 46 Schedule* schedule = NULL); |
| 48 | 47 |
| 49 CompilationInfo* info() const { return info_; } | 48 CompilationInfo* info() const { return info_; } |
| 50 Zone* zone() { return info_->zone(); } | 49 Zone* zone() { return info_->zone(); } |
| 51 Isolate* isolate() { return info_->isolate(); } | 50 Isolate* isolate() { return info_->isolate(); } |
| 52 | 51 |
| 53 static inline bool SupportedTarget() { | 52 static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; } |
| 54 #if V8_TARGET_ARCH_ARM64 | |
| 55 // TODO(turbofan): The ARM64 port is temporarily disabled. | |
| 56 return false; | |
| 57 #else | |
| 58 return V8_TURBOFAN_TARGET != 0; | |
| 59 #endif | |
| 60 } | |
| 61 | 53 |
| 62 static inline bool VerifyGraphs() { | 54 static inline bool VerifyGraphs() { |
| 63 #ifdef DEBUG | 55 #ifdef DEBUG |
| 64 return true; | 56 return true; |
| 65 #else | 57 #else |
| 66 return FLAG_turbo_verify; | 58 return FLAG_turbo_verify; |
| 67 #endif | 59 #endif |
| 68 } | 60 } |
| 69 | 61 |
| 70 private: | 62 private: |
| 71 CompilationInfo* info_; | 63 CompilationInfo* info_; |
| 72 | 64 |
| 73 Schedule* ComputeSchedule(Graph* graph); | 65 Schedule* ComputeSchedule(Graph* graph); |
| 74 void VerifyAndPrintGraph(Graph* graph, const char* phase); | 66 void VerifyAndPrintGraph(Graph* graph, const char* phase); |
| 75 Handle<Code> GenerateCode(Linkage* linkage, Graph* graph, Schedule* schedule, | 67 Handle<Code> GenerateCode(Linkage* linkage, Graph* graph, Schedule* schedule, |
| 76 SourcePositionTable* source_positions); | 68 SourcePositionTable* source_positions); |
| 77 }; | 69 }; |
| 78 } | 70 } |
| 79 } | 71 } |
| 80 } // namespace v8::internal::compiler | 72 } // namespace v8::internal::compiler |
| 81 | 73 |
| 82 #endif // V8_COMPILER_PIPELINE_H_ | 74 #endif // V8_COMPILER_PIPELINE_H_ |
| OLD | NEW |