Chromium Code Reviews| Index: src/hydrogen-dce.h |
| diff --git a/src/hydrogen-escape-analysis.h b/src/hydrogen-dce.h |
| similarity index 77% |
| copy from src/hydrogen-escape-analysis.h |
| copy to src/hydrogen-dce.h |
| index 6ba6e823c54f25f2ef4c45a13c9aedba37cfa566..9be537a459cfc40199896f8e92d703c5beca3270 100644 |
| --- a/src/hydrogen-escape-analysis.h |
| +++ b/src/hydrogen-dce.h |
| @@ -25,33 +25,35 @@ |
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| -#ifndef V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
| -#define V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
| +#ifndef V8_HYDROGEN_DCE_H_ |
| +#define V8_HYDROGEN_DCE_H_ |
| -#include "allocation.h" |
| #include "hydrogen.h" |
| namespace v8 { |
| namespace internal { |
| -class HEscapeAnalysisPhase : public HPhase { |
| +class HDeadCodeEliminationPhase : public HPhase { |
| public: |
| - explicit HEscapeAnalysisPhase(HGraph* graph) |
| - : HPhase("H_Escape analysis", graph), captured_(0, zone()) { } |
| + explicit HDeadCodeEliminationPhase(HGraph* graph) |
| + : HPhase("H_Dead code elimination", graph), |
| + worklist_(graph->blocks()->length(), zone()) { } |
| void Run() { |
| - CollectCapturedValues(); |
| + MarkLiveInstructions(); |
| + RemoveDeadInstructions(); |
| } |
| private: |
| - void CollectCapturedValues(); |
| - void CollectIfNoEscapingUses(HInstruction* instr); |
| + void MarkLive(HValue* ref, HValue* instr); |
| + void MarkLiveInstructions(); |
| + void RemoveDeadInstructions(); |
| - ZoneList<HValue*> captured_; |
| + ZoneList<HValue*> worklist_; |
|
Dmitry Lomov (no reviews)
2013/07/05 19:06:20
It looks like the uses of worklist_ inside MarkLiv
Benedikt Meurer
2013/07/06 07:30:42
Done.
|
| }; |
| } } // namespace v8::internal |
| -#endif // V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
| +#endif // V8_HYDROGEN_DCE_H_ |