Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index decc62705b28808de6ca0f78b66fc503421dbc5e..13bd5541f617e058b299638cbd34f433d69a6e7c 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -810,6 +810,8 @@ class HValue: public ZoneObject { |
| // has processed this instruction. |
| kIDefsProcessingDone, |
| kHasNoObservableSideEffects, |
| + // used during dead code elimination to indicate the instruction is live |
|
Jakob Kummerow
2013/05/08 12:07:24
nit: Our style guide demands that comments be prop
titzer
2013/05/13 13:29:38
Done.
|
| + kIsNotDead, |
|
Sven Panne
2013/05/07 13:32:10
I don't like negated things, especially when the u
titzer
2013/05/13 13:29:38
Done.
|
| kLastFlag = kIDefsProcessingDone |
| }; |
| @@ -1076,6 +1078,11 @@ class HValue: public ZoneObject { |
| return HasNoUses() && !HasObservableSideEffects() && IsDeletable(); |
| } |
| + // has side effects or otherwise cannot be dead code eliminated |
| + bool IsNotDeletable() const { |
| + return HasObservableSideEffects() || !IsDeletable(); |
|
Sven Panne
2013/05/07 13:32:10
Hmmm, do we really need IsDead *and* IsNotDeletabl
titzer
2013/05/13 13:29:38
Done.
|
| + } |
| + |
| #ifdef DEBUG |
| virtual void Verify() = 0; |
| #endif |
| @@ -2965,7 +2972,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 +3031,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 +3080,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_; |
| }; |