diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-10-09 11:47:51 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-10-09 14:42:13 +0100 |
commit | 56b9ee6fe1d6880c5fca0e7feb28b25a1ded2e2f (patch) | |
tree | 34e5163967f59a98e64f2c89489ed7b76334b48a /compiler/optimizing/ssa_liveness_analysis.cc | |
parent | a3c4d72210de174552f47b2d117b1946f274af1e (diff) | |
download | art-56b9ee6fe1d6880c5fca0e7feb28b25a1ded2e2f.zip art-56b9ee6fe1d6880c5fca0e7feb28b25a1ded2e2f.tar.gz art-56b9ee6fe1d6880c5fca0e7feb28b25a1ded2e2f.tar.bz2 |
Stop converting from Location to ManagedRegister.
Now the source of truth is the Location object that knows
which register (core, pair, fpu) it needs to refer to.
Change-Id: I62401343d7479ecfb24b5ed161ec7829cda5a0b1
Diffstat (limited to 'compiler/optimizing/ssa_liveness_analysis.cc')
-rw-r--r-- | compiler/optimizing/ssa_liveness_analysis.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/optimizing/ssa_liveness_analysis.cc b/compiler/optimizing/ssa_liveness_analysis.cc index 1de90b4..f0edc64 100644 --- a/compiler/optimizing/ssa_liveness_analysis.cc +++ b/compiler/optimizing/ssa_liveness_analysis.cc @@ -319,8 +319,8 @@ int LiveInterval::FindFirstRegisterHint(size_t* free_until) const { if (user->IsPhi()) { // If the phi has a register, try to use the same. Location phi_location = user->GetLiveInterval()->ToLocation(); - if (phi_location.IsRegister() && free_until[phi_location.reg().RegId()] >= use_position) { - return phi_location.reg().RegId(); + if (phi_location.IsRegister() && free_until[phi_location.reg()] >= use_position) { + return phi_location.reg(); } const GrowableArray<HBasicBlock*>& predecessors = user->GetBlock()->GetPredecessors(); // If the instruction dies at the phi assignment, we can try having the @@ -333,8 +333,8 @@ int LiveInterval::FindFirstRegisterHint(size_t* free_until) const { HInstruction* input = user->InputAt(i); Location location = input->GetLiveInterval()->GetLocationAt( predecessors.Get(i)->GetLifetimeEnd() - 1); - if (location.IsRegister() && free_until[location.reg().RegId()] >= use_position) { - return location.reg().RegId(); + if (location.IsRegister() && free_until[location.reg()] >= use_position) { + return location.reg(); } } } @@ -345,8 +345,8 @@ int LiveInterval::FindFirstRegisterHint(size_t* free_until) const { // We use the user's lifetime position - 1 (and not `use_position`) because the // register is blocked at the beginning of the user. size_t position = user->GetLifetimePosition() - 1; - if (expected.IsRegister() && free_until[expected.reg().RegId()] >= position) { - return expected.reg().RegId(); + if (expected.IsRegister() && free_until[expected.reg()] >= position) { + return expected.reg(); } } } @@ -369,7 +369,7 @@ int LiveInterval::FindHintAtDefinition() const { // be reused. Location input_location = input_interval.ToLocation(); if (input_location.IsRegister()) { - return input_location.reg().RegId(); + return input_location.reg(); } } } @@ -385,7 +385,7 @@ int LiveInterval::FindHintAtDefinition() const { // be reused. Location location = input_interval.ToLocation(); if (location.IsRegister()) { - return location.reg().RegId(); + return location.reg(); } } } @@ -399,7 +399,7 @@ bool LiveInterval::NeedsTwoSpillSlots() const { Location LiveInterval::ToLocation() const { if (HasRegister()) { - return Location::RegisterLocation(ManagedRegister(GetRegister())); + return Location::RegisterLocation(GetRegister()); } else { HInstruction* defined_by = GetParent()->GetDefinedBy(); if (defined_by->IsConstant()) { |