Revert "Revert "Fix LSRA bug with explicit register temporaries""
This reverts commit a5fc140ff315dda9bc0a8e59963ed547676cd941.
Change-Id: Ic322484176e55d0c7cd7250d629b9e5046006a4f
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index 4cecd61..eb63b49 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -294,6 +294,12 @@
allocated_registers_.Add(location);
}
+ bool HasAllocatedRegister(bool is_core, int reg) const {
+ return is_core
+ ? allocated_registers_.ContainsCoreRegister(reg)
+ : allocated_registers_.ContainsFloatingPointRegister(reg);
+ }
+
void AllocateLocations(HInstruction* instruction);
// Tells whether the stack frame of the compiled method is