diff options
author | David Brazdil <dbrazdil@google.com> | 2015-02-04 13:51:17 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-02-04 13:51:18 +0000 |
commit | c2024144da54504d819869dc928ce4ac975634d4 (patch) | |
tree | 13948cf9a32333337655f1ea4c3a2886bcea25cb /compiler/optimizing/register_allocator_test.cc | |
parent | 53150eb4fb5c3bbcb0138b8dccb481726299f6ab (diff) | |
parent | 5e8b137d28c840b128e2488f954cccee3e86db14 (diff) | |
download | art-c2024144da54504d819869dc928ce4ac975634d4.tar.gz art-c2024144da54504d819869dc928ce4ac975634d4.tar.bz2 art-c2024144da54504d819869dc928ce4ac975634d4.zip |
Merge "Create HGraph outside Builder, print timings"
Diffstat (limited to 'compiler/optimizing/register_allocator_test.cc')
-rw-r--r-- | compiler/optimizing/register_allocator_test.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/optimizing/register_allocator_test.cc b/compiler/optimizing/register_allocator_test.cc index 0e49bf2c79..0cc00c0fde 100644 --- a/compiler/optimizing/register_allocator_test.cc +++ b/compiler/optimizing/register_allocator_test.cc @@ -37,9 +37,10 @@ namespace art { static bool Check(const uint16_t* data) { ArenaPool pool; ArenaAllocator allocator(&pool); - HGraphBuilder builder(&allocator); + HGraph* graph = new (&allocator) HGraph(&allocator); + HGraphBuilder builder(graph); const DexFile::CodeItem* item = reinterpret_cast<const DexFile::CodeItem*>(data); - HGraph* graph = builder.BuildGraph(*item); + builder.BuildGraph(*item); graph->TryBuildingSsa(); x86::CodeGeneratorX86 codegen(graph, CompilerOptions()); SsaLivenessAnalysis liveness(*graph, &codegen); @@ -249,9 +250,10 @@ TEST(RegisterAllocatorTest, Loop2) { } static HGraph* BuildSSAGraph(const uint16_t* data, ArenaAllocator* allocator) { - HGraphBuilder builder(allocator); + HGraph* graph = new (allocator) HGraph(allocator); + HGraphBuilder builder(graph); const DexFile::CodeItem* item = reinterpret_cast<const DexFile::CodeItem*>(data); - HGraph* graph = builder.BuildGraph(*item); + builder.BuildGraph(*item); graph->TryBuildingSsa(); return graph; } |