Revert "Fix LSRA bug with explicit register temporaries"
register_allocator_test32 fails.
This reverts commit 283b8541546e7673d33d104241623d07c91cf500.
Change-Id: I2a46f3c68de3e8273e402102065c13797045c481
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index eb63b49..4cecd61 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -294,12 +294,6 @@
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
diff --git a/compiler/optimizing/locations.h b/compiler/optimizing/locations.h
index 4b25046..f41a782 100644
--- a/compiler/optimizing/locations.h
+++ b/compiler/optimizing/locations.h
@@ -427,11 +427,11 @@
}
}
- bool ContainsCoreRegister(uint32_t id) const {
+ bool ContainsCoreRegister(uint32_t id) {
return Contains(core_registers_, id);
}
- bool ContainsFloatingPointRegister(uint32_t id) const {
+ bool ContainsFloatingPointRegister(uint32_t id) {
return Contains(floating_point_registers_, id);
}
diff --git a/compiler/optimizing/register_allocator.cc b/compiler/optimizing/register_allocator.cc
index a8e3c2f..7b23d02 100644
--- a/compiler/optimizing/register_allocator.cc
+++ b/compiler/optimizing/register_allocator.cc
@@ -209,8 +209,6 @@
Location temp = locations->GetTemp(i);
if (temp.IsRegister() || temp.IsFpuRegister()) {
BlockRegister(temp, position, position + 1);
- // Ensure that an explicit temporary register is marked as being allocated.
- codegen_->AddAllocatedRegister(temp);
} else {
DCHECK(temp.IsUnallocated());
switch (temp.GetPolicy()) {
@@ -509,9 +507,6 @@
}
if (current->HasRegister()) {
- if (kIsDebugBuild && !current->IsFixed()) {
- DCHECK(codegen.HasAllocatedRegister(processing_core_registers, current->GetRegister()));
- }
BitVector* liveness_of_register = liveness_of_values.Get(current->GetRegister());
for (size_t j = it.CurrentRange()->GetStart(); j < it.CurrentRange()->GetEnd(); ++j) {
if (liveness_of_register->IsBitSet(j)) {