Title: [250629] trunk/Source/_javascript_Core
- Revision
- 250629
- Author
- [email protected]
- Date
- 2019-10-02 14:19:16 -0700 (Wed, 02 Oct 2019)
Log Message
FTL OSR exit shouldn't bother updating get_by_id array profiles that have changed modes
https://bugs.webkit.org/show_bug.cgi?id=202493
Reviewed by Saam Barati.
I added this optimization for DFG but forgot to do it for the FTL
at the same time. This patch rectifies that.
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (250628 => 250629)
--- trunk/Source/_javascript_Core/ChangeLog 2019-10-02 21:15:52 UTC (rev 250628)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-10-02 21:19:16 UTC (rev 250629)
@@ -1,3 +1,16 @@
+2019-10-02 Keith Miller <[email protected]>
+
+ FTL OSR exit shouldn't bother updating get_by_id array profiles that have changed modes
+ https://bugs.webkit.org/show_bug.cgi?id=202493
+
+ Reviewed by Saam Barati.
+
+ I added this optimization for DFG but forgot to do it for the FTL
+ at the same time. This patch rectifies that.
+
+ * ftl/FTLOSRExitCompiler.cpp:
+ (JSC::FTL::compileStub):
+
2019-10-02 Paulo Matos <[email protected]>
Gardening build fix: Hide store64/load64 functions from 32bit
Modified: trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp (250628 => 250629)
--- trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp 2019-10-02 21:15:52 UTC (rev 250628)
+++ trunk/Source/_javascript_Core/ftl/FTLOSRExitCompiler.cpp 2019-10-02 21:19:16 UTC (rev 250629)
@@ -28,6 +28,7 @@
#if ENABLE(FTL_JIT)
+#include "BytecodeStructs.h"
#include "DFGOSRExitCompilerCommon.h"
#include "DFGOSRExitPreparation.h"
#include "FTLExitArgumentForOperand.h"
@@ -248,7 +249,15 @@
if (exit.m_kind == BadCache || exit.m_kind == BadIndexingType) {
CodeOrigin codeOrigin = exit.m_codeOriginForExitProfile;
- if (ArrayProfile* arrayProfile = jit.baselineCodeBlockFor(codeOrigin)->getArrayProfile(codeOrigin.bytecodeIndex())) {
+ CodeBlock* codeBlock = jit.baselineCodeBlockFor(codeOrigin);
+ if (ArrayProfile* arrayProfile = codeBlock->getArrayProfile(codeOrigin.bytecodeIndex())) {
+ const Instruction* instruction = codeBlock->instructions().at(codeOrigin.bytecodeIndex()).ptr();
+ CCallHelpers::Jump skipProfile;
+ if (instruction->is<OpGetById>()) {
+ auto& metadata = instruction->as<OpGetById>().metadata(codeBlock);
+ skipProfile = jit.branch8(CCallHelpers::NotEqual, CCallHelpers::AbsoluteAddress(&metadata.m_modeMetadata.mode), CCallHelpers::TrustedImm32(static_cast<uint8_t>(GetByIdMode::ArrayLength)));
+ }
+
jit.load32(MacroAssembler::Address(GPRInfo::regT0, JSCell::structureIDOffset()), GPRInfo::regT1);
jit.store32(GPRInfo::regT1, arrayProfile->addressOfLastSeenStructureID());
@@ -266,6 +275,9 @@
jit.lshift32(GPRInfo::regT1, GPRInfo::regT2);
storeArrayModes.link(&jit);
jit.or32(GPRInfo::regT2, MacroAssembler::AbsoluteAddress(arrayProfile->addressOfArrayModes()));
+
+ if (skipProfile.isSet())
+ skipProfile.link(&jit);
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes