diff options
| author | 2014-12-10 15:52:37 +0000 | |
|---|---|---|
| committer | 2014-12-10 15:52:38 +0000 | |
| commit | 8a3b078aae90f8cd97f44a08267f08216b28b6cf (patch) | |
| tree | c796b1a2f71d4410af9fbdcb970b548a681f3955 /compiler/optimizing/register_allocator.cc | |
| parent | 776b880f66edb21cb3b4225877e494ec7a9ec1a2 (diff) | |
| parent | 3e69f16ae3fddfd24f4f0e29deb106d564ab296c (diff) | |
Merge "Opt compiler: Add arm64 support for register allocation."
Diffstat (limited to 'compiler/optimizing/register_allocator.cc')
| -rw-r--r-- | compiler/optimizing/register_allocator.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc index a6c06359a0..c1c805dc56 100644 --- a/compiler/optimizing/register_allocator.cc +++ b/compiler/optimizing/register_allocator.cc @@ -64,15 +64,17 @@ bool RegisterAllocator::CanAllocateRegistersFor(const HGraph& graph, if (!Supports(instruction_set)) { return false; } + if (instruction_set == kArm64 || instruction_set == kX86_64) { + return true; + } for (size_t i = 0, e = graph.GetBlocks().Size(); i < e; ++i) { for (HInstructionIterator it(graph.GetBlocks().Get(i)->GetInstructions()); !it.Done(); it.Advance()) { HInstruction* current = it.Current(); - if (current->GetType() == Primitive::kPrimLong && instruction_set != kX86_64) return false; - if ((current->GetType() == Primitive::kPrimFloat - || current->GetType() == Primitive::kPrimDouble) - && instruction_set != kX86_64) { + if (current->GetType() == Primitive::kPrimLong || + current->GetType() == Primitive::kPrimFloat || + current->GetType() == Primitive::kPrimDouble) { return false; } } |