Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index decc62705b28808de6ca0f78b66fc503421dbc5e..a739f603e67958d68ec4e95e5b9bc60e6b4c30a7 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -795,6 +795,7 @@ class HValue: public ZoneObject { |
kDeoptimizeOnUndefined, |
kIsArguments, |
kTruncatingToInt32, |
+ // Set after an instruction is killed. |
kIsDead, |
// Instructions that are allowed to produce full range unsigned integer |
// values are marked with kUint32 flag. If arithmetic shift or a load from |
@@ -810,6 +811,8 @@ class HValue: public ZoneObject { |
// has processed this instruction. |
kIDefsProcessingDone, |
kHasNoObservableSideEffects, |
+ // Indicates the instruction is live during dead code elimination. |
+ kIsLive, |
kLastFlag = kIDefsProcessingDone |
}; |
@@ -1072,8 +1075,9 @@ class HValue: public ZoneObject { |
UNREACHABLE(); |
} |
- bool IsDead() const { |
- return HasNoUses() && !HasObservableSideEffects() && IsDeletable(); |
+ // Check if this instruction has some reason that prevents elimination. |
+ bool CanBeEliminated() const { |
+ return !HasObservableSideEffects() && IsDeletable(); |
} |
#ifdef DEBUG |
@@ -2965,7 +2969,6 @@ class HPhi: public HValue { |
: inputs_(2, zone), |
merged_index_(merged_index), |
phi_id_(-1), |
- is_live_(false), |
is_convertible_to_integer_(true) { |
for (int i = 0; i < Representation::kNumRepresentations; i++) { |
non_phi_uses_[i] = 0; |
@@ -3025,8 +3028,6 @@ class HPhi: public HValue { |
return indirect_uses_[Representation::kDouble]; |
} |
int phi_id() { return phi_id_; } |
- bool is_live() { return is_live_; } |
- void set_is_live(bool b) { is_live_ = b; } |
static HPhi* cast(HValue* value) { |
ASSERT(value->IsPhi()); |
@@ -3076,7 +3077,6 @@ class HPhi: public HValue { |
int non_phi_uses_[Representation::kNumRepresentations]; |
int indirect_uses_[Representation::kNumRepresentations]; |
int phi_id_; |
- bool is_live_; |
bool is_convertible_to_integer_; |
}; |