Modified: trunk/Source/_javascript_Core/ChangeLog (97476 => 97477)
--- trunk/Source/_javascript_Core/ChangeLog 2011-10-14 17:15:12 UTC (rev 97476)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-10-14 17:23:39 UTC (rev 97477)
@@ -1,3 +1,19 @@
+2011-10-14 Yuqiang Xian <[email protected]>
+
+ DFG JIT 32_64 - Performance fix for ResolveGlobal
+ https://bugs.webkit.org/show_bug.cgi?id=70096
+
+ Reviewed by Gavin Barraclough.
+
+ Structure check of global object should be a pointer comparison
+ instead of a tag and payload pair comparison. This fix improves
+ SunSpider by 7% on Linux 32, with bitops-bitwise-and improved by 4.75X.
+ Also two trivial fixes for successful 32-bit build are included.
+
+ * dfg/DFGSpeculativeJIT.cpp:
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+
2011-10-13 Filip Pizlo <[email protected]>
Speculation failures in ValueToInt32 are causing a 2x slow-down
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (97476 => 97477)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2011-10-14 17:15:12 UTC (rev 97476)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2011-10-14 17:23:39 UTC (rev 97477)
@@ -29,6 +29,10 @@
#if ENABLE(DFG_JIT)
+#if USE(JSVALUE32_64)
+#include "DFGJITCompilerInlineMethods.h"
+#endif
+
namespace JSC { namespace DFG {
#ifndef NDEBUG
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (97476 => 97477)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-10-14 17:15:12 UTC (rev 97476)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-10-14 17:23:39 UTC (rev 97477)
@@ -854,7 +854,7 @@
}
case ValueToInt32: {
- compileValueToInt32(node.child1());
+ compileValueToInt32(node);
break;
}
@@ -2332,15 +2332,12 @@
// Check Structure of global object
m_jit.move(JITCompiler::TrustedImmPtr(m_jit.codeBlock()->globalObject()), globalObjectGPR);
m_jit.move(JITCompiler::TrustedImmPtr(resolveInfoAddress), resolveInfoGPR);
- m_jit.load32(JITCompiler::Address(resolveInfoGPR, OBJECT_OFFSETOF(GlobalResolveInfo, structure) + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag)), resultTagGPR);
- m_jit.load32(JITCompiler::Address(resolveInfoGPR, OBJECT_OFFSETOF(GlobalResolveInfo, structure) + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload)), resultPayloadGPR);
+ m_jit.loadPtr(JITCompiler::Address(resolveInfoGPR, OBJECT_OFFSETOF(GlobalResolveInfo, structure)), resultPayloadGPR);
- JITCompiler::JumpList structuresNotMatch;
- structuresNotMatch.append(m_jit.branch32(JITCompiler::NotEqual, resultTagGPR, JITCompiler::Address(globalObjectGPR, JSCell::structureOffset() + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag))));
- structuresNotMatch.append(m_jit.branch32(JITCompiler::NotEqual, resultPayloadGPR, JITCompiler::Address(globalObjectGPR, JSCell::structureOffset() + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload))));
+ JITCompiler::Jump structuresNotMatch = m_jit.branchPtr(JITCompiler::NotEqual, resultPayloadGPR, JITCompiler::Address(globalObjectGPR, JSCell::structureOffset()));
// Fast case
- m_jit.load32(JITCompiler::Address(globalObjectGPR, JSObject::offsetOfPropertyStorage()), resultPayloadGPR);
+ m_jit.loadPtr(JITCompiler::Address(globalObjectGPR, JSObject::offsetOfPropertyStorage()), resultPayloadGPR);
m_jit.load32(JITCompiler::Address(resolveInfoGPR, OBJECT_OFFSETOF(GlobalResolveInfo, offset)), resolveInfoGPR);
m_jit.load32(JITCompiler::BaseIndex(resultPayloadGPR, resolveInfoGPR, JITCompiler::TimesEight, OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag)), resultTagGPR);
m_jit.load32(JITCompiler::BaseIndex(resultPayloadGPR, resolveInfoGPR, JITCompiler::TimesEight, OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload)), resultPayloadGPR);