summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/live_ranges_test.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-10-08 21:07:48 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-10-09 15:21:57 +0100
commit360231a056e796c36ffe62348507e904dc9efb9b (patch)
treea62ff73c11eaa6694649c98e4c2d872e89149b0c /compiler/optimizing/live_ranges_test.cc
parent2072c465cfff077da257bdf14f1f1b2690c946c8 (diff)
downloadart-360231a056e796c36ffe62348507e904dc9efb9b.tar.gz
art-360231a056e796c36ffe62348507e904dc9efb9b.tar.bz2
art-360231a056e796c36ffe62348507e904dc9efb9b.zip
Fix code generation of materialized conditions.
Move the logic for knowing if a condition needs to be materialized in an optimization pass (so that the information does not change as a side effect of another optimization). Also clean-up arm and x86_64 codegen: - arm: ldr and str are for power-users when a constant is in play. We should use LoadFromOffset and StoreToOffset. - x86_64: fix misuses of movq instead of movl. Change-Id: I01a03b91803624be2281a344a13ad5efbf4f3ef3
Diffstat (limited to 'compiler/optimizing/live_ranges_test.cc')
-rw-r--r--compiler/optimizing/live_ranges_test.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc
index 8be47461b2..eafc3e1483 100644
--- a/compiler/optimizing/live_ranges_test.cc
+++ b/compiler/optimizing/live_ranges_test.cc
@@ -21,6 +21,7 @@
#include "dex_instruction.h"
#include "nodes.h"
#include "optimizing_unit_test.h"
+#include "prepare_for_register_allocation.h"
#include "ssa_liveness_analysis.h"
#include "utils/arena_allocator.h"
@@ -38,6 +39,8 @@ static HGraph* BuildGraph(const uint16_t* data, ArenaAllocator* allocator) {
graph->BuildDominatorTree();
graph->TransformToSSA();
graph->FindNaturalLoops();
+ // `Inline` conditions into ifs.
+ PrepareForRegisterAllocation(graph).Run();
return graph;
}