summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/ssa_liveness_analysis.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-10-17 11:06:38 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-10-21 11:47:54 +0100
commit8e3964b766652a0478e8e0e303e8556c997675f1 (patch)
treeebae22017d3d3c872642cbc56610f67ff32a861d /compiler/optimizing/ssa_liveness_analysis.h
parent5830247c351a1c40f37666584d6c390f32c31957 (diff)
downloadart-8e3964b766652a0478e8e0e303e8556c997675f1.tar.gz
art-8e3964b766652a0478e8e0e303e8556c997675f1.tar.bz2
art-8e3964b766652a0478e8e0e303e8556c997675f1.zip
Remove the notion of dies at entry.
- Instead, explicitly say that the output does not overlap. - Inputs that must be in a fixed register do die at entry, as we know they have a location that others can not take. - There is also no need to differentiate between an input move and a connecting sibling move - those can be put in the same parallel move instruction. Change-Id: I1b2b2827906601f822b59fb9d6a21d48e43bae27
Diffstat (limited to 'compiler/optimizing/ssa_liveness_analysis.h')
-rw-r--r--compiler/optimizing/ssa_liveness_analysis.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/ssa_liveness_analysis.h b/compiler/optimizing/ssa_liveness_analysis.h
index e9bd30338d..d3e1c0e81f 100644
--- a/compiler/optimizing/ssa_liveness_analysis.h
+++ b/compiler/optimizing/ssa_liveness_analysis.h
@@ -188,10 +188,14 @@ class LiveInterval : public ArenaObject {
&& (first_use_->GetPosition() < position)) {
// The user uses the instruction multiple times, and one use dies before the other.
// We update the use list so that the latter is first.
+ UsePosition* cursor = first_use_;
+ while ((cursor->GetNext() != nullptr) && (cursor->GetNext()->GetPosition() < position)) {
+ cursor = cursor->GetNext();
+ }
DCHECK(first_use_->GetPosition() + 1 == position);
UsePosition* new_use = new (allocator_) UsePosition(
- instruction, input_index, is_environment, position, first_use_->GetNext());
- first_use_->SetNext(new_use);
+ instruction, input_index, is_environment, position, cursor->GetNext());
+ cursor->SetNext(new_use);
if (first_range_->GetEnd() == first_use_->GetPosition()) {
first_range_->end_ = position;
}