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
This commit is contained in:
parent
dce010395d
commit
32f5e099d4
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user