diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
commit | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (patch) | |
tree | b34b0daceb7c8e7fdde4b4ec43650ab7caadb0a9 /Source/JavaScriptCore/dfg/DFGDriver.cpp | |
parent | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (diff) | |
download | qtwebkit-ad0d549d4cc13433f77c1ac8f0ab379c83d93f28.tar.gz |
Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790)
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGDriver.cpp')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGDriver.cpp | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGDriver.cpp b/Source/JavaScriptCore/dfg/DFGDriver.cpp index 27a0dab75..124d7e637 100644 --- a/Source/JavaScriptCore/dfg/DFGDriver.cpp +++ b/Source/JavaScriptCore/dfg/DFGDriver.cpp @@ -28,9 +28,13 @@ #if ENABLE(DFG_JIT) +#include "DFGArithNodeFlagsInferencePhase.h" #include "DFGByteCodeParser.h" +#include "DFGCFAPhase.h" +#include "DFGCSEPhase.h" #include "DFGJITCompiler.h" -#include "DFGPropagator.h" +#include "DFGPredictionPropagationPhase.h" +#include "DFGVirtualRegisterAllocationPhase.h" namespace JSC { namespace DFG { @@ -44,19 +48,28 @@ inline bool compile(CompileMode compileMode, JSGlobalData& globalData, CodeBlock ASSERT(codeBlock->alternative()->getJITType() == JITCode::BaselineJIT); #if DFG_ENABLE(DEBUG_VERBOSE) - fprintf(stderr, "DFG compiling code block %p(%p), number of instructions = %u.\n", codeBlock, codeBlock->alternative(), codeBlock->instructionCount()); + dataLog("DFG compiling code block %p(%p), number of instructions = %u.\n", codeBlock, codeBlock->alternative(), codeBlock->instructionCount()); #endif - Graph dfg; - if (!parse(dfg, &globalData, codeBlock)) + Graph dfg(globalData, codeBlock); + if (!parse(dfg)) return false; if (compileMode == CompileFunction) - dfg.predictArgumentTypes(codeBlock); - - propagate(dfg, &globalData, codeBlock); + dfg.predictArgumentTypes(); + + performArithNodeFlagsInference(dfg); + performPredictionPropagation(dfg); + performCSE(dfg); + performVirtualRegisterAllocation(dfg); + performCFA(dfg); + +#if DFG_ENABLE(DEBUG_VERBOSE) + dataLog("Graph after optimization:\n"); + dfg.dump(); +#endif - JITCompiler dataFlowJIT(&globalData, dfg, codeBlock); + JITCompiler dataFlowJIT(dfg); if (compileMode == CompileFunction) { ASSERT(jitCodeWithArityCheck); |