summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_liveness_analysis.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-05-18 22:31:29 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-05-29 14:15:04 +0100
commitd23eeef3492b53102eb8093524cf37e2b4c296db (patch)
tree57d3e9ab2853d5b8092568bb3d29bc850c113315 /compiler/optimizing/ssa_liveness_analysis.h
parenta15c78d3cc28f514a482ffd792a767e97fe53c95 (diff)
Support for inlining methods that call/throw.
Mostly fixes here and there to make it working. Change-Id: I1b535e895105d78b65634636d675b818551f783e
Diffstat (limited to 'compiler/optimizing/ssa_liveness_analysis.h')
-rw-r--r--compiler/optimizing/ssa_liveness_analysis.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/optimizing/ssa_liveness_analysis.h b/compiler/optimizing/ssa_liveness_analysis.h
index 4b19c5b46a..4cbe29ae42 100644
--- a/compiler/optimizing/ssa_liveness_analysis.h
+++ b/compiler/optimizing/ssa_liveness_analysis.h
@@ -117,6 +117,7 @@ class UsePosition : public ArenaObject<kArenaAllocMisc> {
|| user->IsPhi()
|| (GetPosition() == user->GetLifetimePosition() + 1)
|| (GetPosition() == user->GetLifetimePosition()));
+ DCHECK(environment == nullptr || user == nullptr);
DCHECK(next_ == nullptr || next->GetPosition() >= GetPosition());
}
@@ -128,6 +129,7 @@ class UsePosition : public ArenaObject<kArenaAllocMisc> {
void SetNext(UsePosition* next) { next_ = next; }
HInstruction* GetUser() const { return user_; }
+ HEnvironment* GetEnvironment() const { return environment_; }
bool GetIsEnvironment() const { return environment_ != nullptr; }
bool IsSynthesized() const { return user_ == nullptr; }
@@ -280,7 +282,7 @@ class LiveInterval : public ArenaObject<kArenaAllocMisc> {
}
DCHECK(first_use_->GetPosition() + 1 == position);
UsePosition* new_use = new (allocator_) UsePosition(
- instruction, environment, input_index, position, cursor->GetNext());
+ instruction, nullptr /* environment */, input_index, position, cursor->GetNext());
cursor->SetNext(new_use);
if (first_range_->GetEnd() == first_use_->GetPosition()) {
first_range_->end_ = position;
@@ -290,10 +292,10 @@ class LiveInterval : public ArenaObject<kArenaAllocMisc> {
if (is_environment) {
first_env_use_ = new (allocator_) UsePosition(
- instruction, environment, input_index, position, first_env_use_);
+ nullptr /* instruction */, environment, input_index, position, first_env_use_);
} else {
first_use_ = new (allocator_) UsePosition(
- instruction, environment, input_index, position, first_use_);
+ instruction, nullptr /* environment */, input_index, position, first_use_);
}
if (is_environment && !keep_alive) {