summaryrefslogtreecommitdiff
path: root/compiler/optimizing/register_allocator.cc
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2014-12-10 15:52:37 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-12-10 15:52:38 +0000
commit8a3b078aae90f8cd97f44a08267f08216b28b6cf (patch)
treec796b1a2f71d4410af9fbdcb970b548a681f3955 /compiler/optimizing/register_allocator.cc
parent776b880f66edb21cb3b4225877e494ec7a9ec1a2 (diff)
parent3e69f16ae3fddfd24f4f0e29deb106d564ab296c (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.cc10
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;
}
}