summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGPhase.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/dfg/DFGPhase.h
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGPhase.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGPhase.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGPhase.h b/Source/JavaScriptCore/dfg/DFGPhase.h
index 6de043bbd..e92049c43 100644
--- a/Source/JavaScriptCore/dfg/DFGPhase.h
+++ b/Source/JavaScriptCore/dfg/DFGPhase.h
@@ -26,8 +26,6 @@
#ifndef DFGPhase_h
#define DFGPhase_h
-#include <wtf/Platform.h>
-
#if ENABLE(DFG_JIT)
#include "DFGCommon.h"
@@ -51,6 +49,8 @@ public:
const char* name() const { return m_name; }
+ Graph& graph() { return m_graph; }
+
// Each phase must have a run() method.
protected:
@@ -60,6 +60,9 @@ protected:
VM& vm() { return m_graph.m_vm; }
CodeBlock* codeBlock() { return m_graph.m_codeBlock; }
CodeBlock* profiledBlock() { return m_graph.m_profiledBlock; }
+
+ // This runs validation, and uses the graph dump before the phase if possible.
+ void validate();
const char* m_name;
@@ -67,13 +70,15 @@ private:
// Call these hooks when starting and finishing.
void beginPhase();
void endPhase();
+
+ CString m_graphDumpBeforePhase;
};
template<typename PhaseType>
bool runAndLog(PhaseType& phase)
{
bool result = phase.run();
- if (result && logCompilationChanges())
+ if (result && logCompilationChanges(phase.graph().m_plan.mode))
dataLogF("Phase %s changed the IR.\n", phase.name());
return result;
}