Commit 32f5e099 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Add templatized Run() method for Hydrogen phases.

Depends upon https://codereview.chromium.org/17657004

R=danno@chromium.org
BUG=

Review URL: https://codereview.chromium.org/18034003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent dce01039
......@@ -4014,10 +4014,7 @@ bool HGraph::Optimize(SmartArrayPointer<char>* bailout_reason) {
if (FLAG_use_canonicalizing) Canonicalize();
if (FLAG_use_gvn) {
HGlobalValueNumberingPhase phase(this);
phase.Run();
}
if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>();
if (FLAG_use_range) {
HRangeAnalysis rangeAnalysis(this);
......
......@@ -427,6 +427,9 @@ class HGraph: public ZoneObject {
HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
int32_t integer_value);
template<class Phase>
void Run() { Phase phase(this); phase.Run(); }
void MarkLive(HValue* ref, HValue* instr, ZoneList<HValue*>* worklist);
void MarkLiveInstructions();
void RemoveDeadInstructions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment