Cleanup V8_TURBOFAN_TARGET definition.
authorbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 5 Aug 2014 11:53:32 +0000 (11:53 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 5 Aug 2014 11:53:32 +0000 (11:53 +0000)
Move to globals.h so we do no longer skip any number of
tests. Introduce V8_TURBOFAN_BACKEND, which is 1 if we
actually have a backend and want to compile it, but don't
run the tests.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/444503003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/compiler/arm64/instruction-selector-arm64.cc
src/compiler/code-generator.cc
src/compiler/instruction-selector.cc
src/compiler/pipeline.h
src/globals.h
test/cctest/compiler/test-scheduler.cc

index 30502441896f84b143a1830d35e13d05bebc915d..bd23dfd17e2a6fc9d7a85181df26f2c8a46a55c3 100644 (file)
@@ -9,8 +9,6 @@ namespace v8 {
 namespace internal {
 namespace compiler {
 
-#if V8_TURBOFAN_TARGET
-
 enum ImmediateMode {
   kArithimeticImm,  // 12 bit unsigned immediate shifted left 0 or 12 bits
   kShift32Imm,      // 0 - 31
@@ -664,8 +662,6 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
   }
 }
 
-#endif  // V8_TURBOFAN_TARGET
-
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
index dfd18cc4ee0b456d8e1bf049eb492bc0f63f25a8..8db8b0b873539cefc3782f1c03b29f1858a00c3d 100644 (file)
@@ -287,7 +287,8 @@ void CodeGenerator::BuildTranslation(Instruction* instr,
 }
 
 
-#if !V8_TURBOFAN_TARGET
+#if !V8_TURBOFAN_BACKEND
+
 void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
   UNIMPLEMENTED();
 }
@@ -334,7 +335,7 @@ bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
 }
 #endif
 
-#endif
+#endif  // !V8_TURBOFAN_BACKEND
 
 
 }  // namespace compiler
index 651f9ac44dc6f7bca22a5a35333bdaa0509a568d..15ff73966b8507628c6d63ffa92e995435e1e35f 100644 (file)
@@ -604,7 +604,7 @@ void InstructionSelector::VisitNode(Node* node) {
 }
 
 
-#if V8_TURBOFAN_TARGET
+#if V8_TURBOFAN_BACKEND
 
 void InstructionSelector::VisitWord32Equal(Node* node) {
   FlagsContinuation cont(kEqual, node);
@@ -699,10 +699,10 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) {
   VisitFloat64Compare(node, &cont);
 }
 
-#endif  // V8_TURBOFAN_TARGET
+#endif  // V8_TURBOFAN_BACKEND
 
 // 32 bit targets do not implement the following instructions.
-#if V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_TARGET
+#if V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_BACKEND
 
 void InstructionSelector::VisitWord64And(Node* node) { UNIMPLEMENTED(); }
 
@@ -752,12 +752,12 @@ void InstructionSelector::VisitConvertInt32ToInt64(Node* node) {
   UNIMPLEMENTED();
 }
 
-#endif  // V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_TARGET
+#endif  // V8_TARGET_ARCH_32_BIT && V8_TURBOFAN_BACKEND
 
 
 // 32-bit targets and unsupported architectures need dummy implementations of
 // selected 64-bit ops.
-#if V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET
+#if V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_BACKEND
 
 void InstructionSelector::VisitWord64Test(Node* node, FlagsContinuation* cont) {
   UNIMPLEMENTED();
@@ -769,7 +769,7 @@ void InstructionSelector::VisitWord64Compare(Node* node,
   UNIMPLEMENTED();
 }
 
-#endif  // V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_TARGET
+#endif  // V8_TARGET_ARCH_32_BIT || !V8_TURBOFAN_BACKEND
 
 
 void InstructionSelector::VisitParameter(Node* node) {
@@ -963,7 +963,7 @@ void InstructionSelector::VisitDeoptimization(Node* deopt) {
 }
 
 
-#if !V8_TURBOFAN_TARGET
+#if !V8_TURBOFAN_BACKEND
 
 #define DECLARE_UNIMPLEMENTED_SELECTOR(x) \
   void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); }
@@ -1003,7 +1003,7 @@ void InstructionSelector::VisitFloat64Compare(Node* node,
 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
                                     BasicBlock* deoptimization) {}
 
-#endif  // !V8_TURBOFAN_TARGET
+#endif  // !V8_TURBOFAN_BACKEND
 
 }  // namespace compiler
 }  // namespace internal
index 82af766c3c426414e857effc426d2a8a69237cf8..f6dd39a34b6eb6b59335f4a5747ee4506f0f2296 100644 (file)
 // Note: TODO(turbofan) implies a performance improvement opportunity,
 //   and TODO(name) implies an incomplete implementation
 
-#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM
-#ifndef _WIN64
-#define V8_TURBOFAN_TARGET 1
-#else
-#define V8_TURBOFAN_TARGET 0
-#endif
-#else
-#define V8_TURBOFAN_TARGET 0
-#endif
-
 namespace v8 {
 namespace internal {
 namespace compiler {
@@ -49,6 +39,7 @@ class Pipeline {
   Zone* zone() { return info_->zone(); }
   Isolate* isolate() { return info_->isolate(); }
 
+  static inline bool SupportedBackend() { return V8_TURBOFAN_BACKEND != 0; }
   static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; }
 
   static inline bool VerifyGraphs() {
index 6b6a816497a97fa76034d2d4047553bb2c60a4a0..000fa47bd8e9843e9440ed0fa9b5c69cff467d5e 100644 (file)
 # define V8_INFINITY INFINITY
 #endif
 
+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM || \
+    V8_TARGET_ARCH_ARM64
+#define V8_TURBOFAN_BACKEND 1
+#else
+#define V8_TURBOFAN_BACKEND 0
+#endif
+#if V8_TURBOFAN_BACKEND && !V8_TARGET_ARCH_ARM64 && \
+    !(V8_OS_WIN && V8_TARGET_ARCH_X64)
+#define V8_TURBOFAN_TARGET 1
+#else
+#define V8_TURBOFAN_TARGET 0
+#endif
+
 namespace v8 {
 
 namespace base {
index e002d456d11236f4131abcf9e9249cdf0cfa11ec..e33f000b2631dada1197e67e68858bf8817ac695 100644 (file)
@@ -1763,7 +1763,7 @@ TEST(BuildScheduleTrivialLazyDeoptCall) {
 
   Node* undef_node = graph.NewNode(common_builder.HeapConstant(undef_constant));
 
-  Node* start_node = graph.NewNode(common_builder.Start());
+  Node* start_node = graph.NewNode(common_builder.Start(0));
 
   CallDescriptor* descriptor = linkage.GetJSCallDescriptor(0);
   Node* call_node = graph.NewNode(common_builder.Call(descriptor),