Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 62c98153894c9103b51754b82d67a9a6775067ec..719c15b84eedbf1aa66bce0504a92426adc5ae6a 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -794,6 +794,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 |
@@ -809,6 +810,8 @@ class HValue: public ZoneObject { |
// has processed this instruction. |
kIDefsProcessingDone, |
kHasNoObservableSideEffects, |
+ // Indicates the instruction is live during dead code elimination. |
+ kIsLive, |
kLastFlag = kIDefsProcessingDone |
}; |
@@ -1071,8 +1074,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 |
@@ -2969,7 +2973,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; |
@@ -3029,8 +3032,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()); |
@@ -3080,7 +3081,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_; |
}; |