Reviewers: titzer,
Message:
PTAL
Description:
Cleanup V8_TURBOFAN_TARGET definition.
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.
Please review this at https://codereview.chromium.org/444503003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+26, -25 lines):
M src/compiler/arm64/instruction-selector-arm64.cc
M src/compiler/code-generator.cc
M src/compiler/instruction-selector.cc
M src/compiler/pipeline.h
M src/globals.h
M test/cctest/compiler/test-scheduler.cc
Index: src/compiler/arm64/instruction-selector-arm64.cc
diff --git a/src/compiler/arm64/instruction-selector-arm64.cc
b/src/compiler/arm64/instruction-selector-arm64.cc
index
30502441896f84b143a1830d35e13d05bebc915d..bd23dfd17e2a6fc9d7a85181df26f2c8a46a55c3
100644
--- a/src/compiler/arm64/instruction-selector-arm64.cc
+++ b/src/compiler/arm64/instruction-selector-arm64.cc
@@ -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: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index
dfd18cc4ee0b456d8e1bf049eb492bc0f63f25a8..8db8b0b873539cefc3782f1c03b29f1858a00c3d
100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -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: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc
b/src/compiler/instruction-selector.cc
index
651f9ac44dc6f7bca22a5a35333bdaa0509a568d..15ff73966b8507628c6d63ffa92e995435e1e35f
100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -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: src/compiler/pipeline.h
diff --git a/src/compiler/pipeline.h b/src/compiler/pipeline.h
index
82af766c3c426414e857effc426d2a8a69237cf8..f6dd39a34b6eb6b59335f4a5747ee4506f0f2296
100644
--- a/src/compiler/pipeline.h
+++ b/src/compiler/pipeline.h
@@ -12,16 +12,6 @@
// 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: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index
6b6a816497a97fa76034d2d4047553bb2c60a4a0..000fa47bd8e9843e9440ed0fa9b5c69cff467d5e
100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -25,6 +25,19 @@
# 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: test/cctest/compiler/test-scheduler.cc
diff --git a/test/cctest/compiler/test-scheduler.cc
b/test/cctest/compiler/test-scheduler.cc
index
e002d456d11236f4131abcf9e9249cdf0cfa11ec..e33f000b2631dada1197e67e68858bf8817ac695
100644
--- a/test/cctest/compiler/test-scheduler.cc
+++ b/test/cctest/compiler/test-scheduler.cc
@@ -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),
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.