OSR exit shouldn't bother updating get_by_id array profiles that have changed modes
Created attachment 379744 [details] Patch
<rdar://problem/52669110>
Comment on attachment 379744 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=379744&action=review r=me > Source/JavaScriptCore/dfg/DFGOSRExit.cpp:523 > + bool doProfile = instruction->opcodeID() != op_get_by_id || instruction->as<OpGetById>().metadata(profiledCodeBlock).m_modeMetadata.mode == GetByIdMode::ArrayLength; You can use `!instruction->is<OpGetById>()`. > Source/JavaScriptCore/dfg/DFGOSRExit.cpp:1176 > + if (instruction->opcodeID() == op_get_by_id) { Ditto. You can use `instruction->is<OpGetById>()`.
Comment on attachment 379744 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=379744&action=review >> Source/JavaScriptCore/dfg/DFGOSRExit.cpp:523 >> + bool doProfile = instruction->opcodeID() != op_get_by_id || instruction->as<OpGetById>().metadata(profiledCodeBlock).m_modeMetadata.mode == GetByIdMode::ArrayLength; > > You can use `!instruction->is<OpGetById>()`. Nice! Fixed, thanks! >> Source/JavaScriptCore/dfg/DFGOSRExit.cpp:1176 >> + if (instruction->opcodeID() == op_get_by_id) { > > Ditto. You can use `instruction->is<OpGetById>()`. ditto.
Comment on attachment 379744 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=379744&action=review > Source/JavaScriptCore/dfg/DFGOSRExit.cpp:1174 > if (ArrayProfile* arrayProfile = jit.baselineCodeBlockFor(codeOrigin)->getArrayProfile(codeOrigin.bytecodeIndex())) { > + const Instruction* instruction = jit.baselineCodeBlockFor(codeOrigin)->instructions().at(codeOrigin.bytecodeIndex()).ptr(); Can you just compute jit.baselineCodeBlockFor(codeOrigin) once and pre-cache it?
Comment on attachment 379744 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=379744&action=review >> Source/JavaScriptCore/dfg/DFGOSRExit.cpp:1174 >> + const Instruction* instruction = jit.baselineCodeBlockFor(codeOrigin)->instructions().at(codeOrigin.bytecodeIndex()).ptr(); > > Can you just compute jit.baselineCodeBlockFor(codeOrigin) once and pre-cache it? Sure, done.
Created attachment 379749 [details] Patch for landing
Comment on attachment 379749 [details] Patch for landing Clearing flags on attachment: 379749 Committed r250440: <https://trac.webkit.org/changeset/250440>
All reviewed patches have been landed. Closing bug.
You missed the FTL
(In reply to Saam Barati from comment #10) > You missed the FTL Whoops, will fix.
See: https://bugs.webkit.org/show_bug.cgi?id=202493 for FTL version.