OSDN Git Service

Fix code generation of materialized conditions.
authorNicolas Geoffray <ngeoffray@google.com>
Wed, 8 Oct 2014 20:07:48 +0000 (21:07 +0100)
committerNicolas Geoffray <ngeoffray@google.com>
Thu, 9 Oct 2014 14:21:57 +0000 (15:21 +0100)
commit360231a056e796c36ffe62348507e904dc9efb9b
treea62ff73c11eaa6694649c98e4c2d872e89149b0c
parent2072c465cfff077da257bdf14f1f1b2690c946c8
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
14 files changed:
compiler/optimizing/code_generator_arm.cc
compiler/optimizing/code_generator_arm.h
compiler/optimizing/code_generator_x86.cc
compiler/optimizing/code_generator_x86.h
compiler/optimizing/code_generator_x86_64.cc
compiler/optimizing/code_generator_x86_64.h
compiler/optimizing/codegen_test.cc
compiler/optimizing/live_ranges_test.cc
compiler/optimizing/liveness_test.cc
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h
compiler/optimizing/prepare_for_register_allocation.cc
compiler/optimizing/prepare_for_register_allocation.h
compiler/optimizing/register_allocator.cc