Changeset 91115 in webkit
- Timestamp:
- Jul 15, 2011 2:57:35 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r91099 r91115 1 2011-07-15 Gavin Barraclough <barraclough@apple.com> 2 3 DFG JIT - Where arguments passed are integers, speculate this. 4 https://bugs.webkit.org/show_bug.cgi?id=64630 5 6 Reviewed by Sam Weinig. 7 8 Presently the DFG JIT is overly aggressively predicting double. 9 Use a bit of dynamic information, and curtail this a little. 10 11 * dfg/DFGGraph.cpp: 12 (JSC::DFG::Graph::predictArgumentTypes): 13 - Check for integer arguments. 14 * dfg/DFGGraph.h: 15 - Function declaration. 16 * runtime/Executable.cpp: 17 (JSC::tryDFGCompile): 18 (JSC::FunctionExecutable::compileForCallInternal): 19 - Add call to predictArgumentTypes. 20 1 21 2011-07-15 Filip Pizlo <fpizlo@apple.com> 2 22 -
trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp
r90423 r91115 177 177 } 178 178 179 void Graph::predictArgumentTypes(ExecState* exec) 180 { 181 size_t numberOfArguments = std::min(exec->argumentCountIncludingThis(), m_argumentPredictions.size()); 182 183 for (size_t arg = 1; arg < numberOfArguments; ++arg) { 184 if (exec->argument(arg - 1).isInt32()) 185 m_argumentPredictions[arg].m_value |= PredictInt32; 186 } 187 } 188 179 189 } } // namespace JSC::DFG 180 190 -
trunk/Source/JavaScriptCore/dfg/DFGGraph.h
r90423 r91115 37 37 38 38 class CodeBlock; 39 struct ExecState; 39 40 40 41 namespace DFG { … … 165 166 #endif 166 167 168 void predictArgumentTypes(ExecState*); 169 167 170 Vector< OwnPtr<BasicBlock> , 8> m_blocks; 168 171 Vector<NodeIndex, 16> m_varArgChildren; -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r89964 r91115 260 260 261 261 #if ENABLE(JIT) 262 static bool tryDFGCompile(JSGlobalData* globalData, CodeBlock* codeBlock, JITCode& jitCode, MacroAssemblerCodePtr& jitCodeWithArityCheck) 263 { 262 static bool tryDFGCompile(ExecState* exec, CodeBlock* codeBlock, JITCode& jitCode, MacroAssemblerCodePtr& jitCodeWithArityCheck) 263 { 264 JSGlobalData* globalData = &exec->globalData(); 264 265 #if ENABLE(DFG_JIT) 265 266 #if ENABLE(DFG_JIT_RESTRICTIONS) … … 272 273 if (!parse(dfg, globalData, codeBlock)) 273 274 return false; 275 276 dfg.predictArgumentTypes(exec); 274 277 275 278 DFG::JITCompiler dataFlowJIT(globalData, dfg, codeBlock); … … 330 333 #if ENABLE(JIT) 331 334 if (exec->globalData().canUseJIT()) { 332 bool dfgCompiled = tryDFGCompile( &exec->globalData(), m_codeBlockForCall.get(), m_jitCodeForCall, m_jitCodeForCallWithArityCheck);335 bool dfgCompiled = tryDFGCompile(exec, m_codeBlockForCall.get(), m_jitCodeForCall, m_jitCodeForCallWithArityCheck); 333 336 if (!dfgCompiled) 334 337 m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, m_codeBlockForCall.get(), &m_jitCodeForCallWithArityCheck);
Note: See TracChangeset
for help on using the changeset viewer.