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

Unified Diff: test/compiler-unittests/instruction-selector-unittest.cc

Issue 469743002: [turbofan] Refactor the InstructionSelector tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM64 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/compiler-unittests/instruction-selector-unittest.h ('k') | testing/gtest.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiler-unittests/instruction-selector-unittest.cc
diff --git a/test/compiler-unittests/instruction-selector-unittest.cc b/test/compiler-unittests/instruction-selector-unittest.cc
index 70186529afbee0e083190c965dc2a1e7d098f351..725c4313c9f61068c64408ec7d1ee8a1515544b0 100644
--- a/test/compiler-unittests/instruction-selector-unittest.cc
+++ b/test/compiler-unittests/instruction-selector-unittest.cc
@@ -4,14 +4,23 @@
#include "test/compiler-unittests/instruction-selector-unittest.h"
+#include "src/flags.h"
+
namespace v8 {
namespace internal {
namespace compiler {
+InstructionSelectorTest::InstructionSelectorTest() : rng_(FLAG_random_seed) {}
+
+
InstructionSelectorTest::Stream InstructionSelectorTest::StreamBuilder::Build(
InstructionSelector::Features features,
InstructionSelectorTest::StreamBuilderMode mode) {
Schedule* schedule = Export();
+ if (FLAG_trace_turbo) {
+ OFStream out(stdout);
+ out << "=== Schedule before instruction selection ===" << endl << *schedule;
+ }
EXPECT_NE(0, graph()->NodeCount());
CompilationInfo info(test_->isolate(), test_->zone());
Linkage linkage(&info, call_descriptor());
@@ -21,7 +30,7 @@ InstructionSelectorTest::Stream InstructionSelectorTest::StreamBuilder::Build(
selector.SelectInstructions();
if (FLAG_trace_turbo) {
OFStream out(stdout);
- out << "--- Code sequence after instruction selection ---" << endl
+ out << "=== Code sequence after instruction selection ===" << endl
<< sequence;
}
Stream s;
@@ -62,7 +71,7 @@ InstructionSelectorTest::Stream InstructionSelectorTest::StreamBuilder::Build(
}
-TARGET_TEST_F(InstructionSelectorTest, ReturnP) {
+TARGET_TEST_F(InstructionSelectorTest, ReturnParameter) {
StreamBuilder m(this, kMachineWord32, kMachineWord32);
m.Return(m.Parameter(0));
Stream s = m.Build(kAllInstructions);
@@ -74,7 +83,7 @@ TARGET_TEST_F(InstructionSelectorTest, ReturnP) {
}
-TARGET_TEST_F(InstructionSelectorTest, ReturnImm) {
+TARGET_TEST_F(InstructionSelectorTest, ReturnZero) {
StreamBuilder m(this, kMachineWord32);
m.Return(m.Int32Constant(0));
Stream s = m.Build(kAllInstructions);
« no previous file with comments | « test/compiler-unittests/instruction-selector-unittest.h ('k') | testing/gtest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698