summaryrefslogtreecommitdiff
path: root/compiler/optimizing/linearize_test.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2014-09-11 10:30:02 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2014-09-11 10:32:12 +0100
commit8a16d97fb8f031822b206e65f9109a071da40563 (patch)
tree9dbbf5feaac15d2e4f54fbfc3c204fcdd6e8317a /compiler/optimizing/linearize_test.cc
parentc7f6b86c269727fe031146b9c18652d40916d46f (diff)
Fix valgrind errors.
For now just stack allocate the code generator. Will think about cleaning up the root problem later (CodeGenerator being an arena object). Change-Id: I161a6f61c5f27ea88851b446f3c1e12ee9c594d7
Diffstat (limited to 'compiler/optimizing/linearize_test.cc')
-rw-r--r--compiler/optimizing/linearize_test.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/optimizing/linearize_test.cc b/compiler/optimizing/linearize_test.cc
index e4f9371e62..6dd4207795 100644
--- a/compiler/optimizing/linearize_test.cc
+++ b/compiler/optimizing/linearize_test.cc
@@ -19,6 +19,7 @@
#include "base/stringprintf.h"
#include "builder.h"
#include "code_generator.h"
+#include "code_generator_x86.h"
#include "dex_file.h"
#include "dex_instruction.h"
#include "graph_visualizer.h"
@@ -45,8 +46,8 @@ static void TestCode(const uint16_t* data, const int* expected_order, size_t num
graph->TransformToSSA();
graph->FindNaturalLoops();
- CodeGenerator* codegen = CodeGenerator::Create(&allocator, graph, InstructionSet::kX86);
- SsaLivenessAnalysis liveness(*graph, codegen);
+ x86::CodeGeneratorX86 codegen(graph);
+ SsaLivenessAnalysis liveness(*graph, &codegen);
liveness.Analyze();
ASSERT_EQ(liveness.GetLinearPostOrder().Size(), number_of_blocks);