diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-05-14 09:43:38 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-05-16 09:07:31 +0100 |
commit | 0d3f578909d0d1ea072ca68d78301b6fb7a44451 (patch) | |
tree | 5a90ec26839afa06294a46e67a4c4481982c47bf /compiler/optimizing/ssa_test.cc | |
parent | c2ffcecb61e474f29f3c6a8721dfd00e0252b1f8 (diff) | |
download | art-0d3f578909d0d1ea072ca68d78301b6fb7a44451.zip art-0d3f578909d0d1ea072ca68d78301b6fb7a44451.tar.gz art-0d3f578909d0d1ea072ca68d78301b6fb7a44451.tar.bz2 |
Linearize the graph before creating live ranges.
Change-Id: I02eb5671e3304ab062286131745c1366448aff58
Diffstat (limited to 'compiler/optimizing/ssa_test.cc')
-rw-r--r-- | compiler/optimizing/ssa_test.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/optimizing/ssa_test.cc b/compiler/optimizing/ssa_test.cc index 415d146..d104619 100644 --- a/compiler/optimizing/ssa_test.cc +++ b/compiler/optimizing/ssa_test.cc @@ -28,9 +28,9 @@ namespace art { -class StringPrettyPrinter : public HPrettyPrinter { +class SsaPrettyPrinter : public HPrettyPrinter { public: - explicit StringPrettyPrinter(HGraph* graph) : HPrettyPrinter(graph), str_("") {} + explicit SsaPrettyPrinter(HGraph* graph) : HPrettyPrinter(graph), str_("") {} virtual void PrintInt(int value) { str_ += StringPrintf("%d", value); @@ -59,7 +59,7 @@ class StringPrettyPrinter : public HPrettyPrinter { private: std::string str_; - DISALLOW_COPY_AND_ASSIGN(StringPrettyPrinter); + DISALLOW_COPY_AND_ASSIGN(SsaPrettyPrinter); }; static void ReNumberInstructions(HGraph* graph) { @@ -82,11 +82,12 @@ static void TestCode(const uint16_t* data, const char* expected) { const DexFile::CodeItem* item = reinterpret_cast<const DexFile::CodeItem*>(data); HGraph* graph = builder.BuildGraph(*item); ASSERT_NE(graph, nullptr); + graph->BuildDominatorTree(); graph->TransformToSSA(); ReNumberInstructions(graph); - StringPrettyPrinter printer(graph); + SsaPrettyPrinter printer(graph); printer.VisitInsertionOrder(); ASSERT_STREQ(expected, printer.str().c_str()); |