From 360231a056e796c36ffe62348507e904dc9efb9b Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 8 Oct 2014 21:07:48 +0100 Subject: 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 --- compiler/optimizing/liveness_test.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/optimizing/liveness_test.cc') diff --git a/compiler/optimizing/liveness_test.cc b/compiler/optimizing/liveness_test.cc index 2d861696bb..246e7ef309 100644 --- a/compiler/optimizing/liveness_test.cc +++ b/compiler/optimizing/liveness_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" @@ -50,6 +51,8 @@ static void TestCode(const uint16_t* data, const char* expected) { graph->BuildDominatorTree(); graph->TransformToSSA(); graph->FindNaturalLoops(); + // `Inline` conditions into ifs. + PrepareForRegisterAllocation(graph).Run(); x86::CodeGeneratorX86 codegen(graph); SsaLivenessAnalysis liveness(*graph, &codegen); liveness.Analyze(); -- cgit v1.2.3-59-g8ed1b