spill unboxed values in DFG 32_64
authoryuqiang.xian@intel.com <yuqiang.xian@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Dec 2011 04:33:20 +0000 (04:33 +0000)
committeryuqiang.xian@intel.com <yuqiang.xian@intel.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Dec 2011 04:33:20 +0000 (04:33 +0000)
commitf381b052db5e7d9ee006e5b424097660613439ad
tree18ea8b71752761b263af483cbbb35a0d4b951d27
parent9b9d12c6180cccfa4038e5d2b5fe2b8d06d1e78b
spill unboxed values in DFG 32_64
https://bugs.webkit.org/show_bug.cgi?id=75291

Reviewed by Filip Pizlo.

Currently all the values are spilled as boxed in DFG 32_64, which is
not necessary and introduces additional stores/loads. Instead we
can spill them as unboxed if feasible. It can be applied to the
Integers, Cells and Booleans in DFG 32_64. Doubles are left as is
because they don't need to be boxed at all. The modifications to the
spill/fill and the OSR exit are required, as well as a bug fix to the
"isUnknownJS" logic.

* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::displacedInRegisterFile):
(JSC::ValueRecovery::virtualRegister):
(JSC::ValueRecovery::dump):
* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::isUnknownJS):
(JSC::DFG::GenerationInfo::spill):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::isKnownNotBoolean):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::silentFillGPR):
(JSC::DFG::SpeculativeJIT::spill):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillInteger):
(JSC::DFG::SpeculativeJIT::fillDouble):
(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/ValueRecovery.h
Source/JavaScriptCore/dfg/DFGGenerationInfo.h
Source/JavaScriptCore/dfg/DFGOSRExitCompiler32_64.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp