RESOLVED FIXED 216669
DFG should ensure there are PhantomLocals for the taken block of op_jneq_ptr
https://bugs.webkit.org/show_bug.cgi?id=216669
Summary DFG should ensure there are PhantomLocals for the taken block of op_jneq_ptr
Keith Miller
Reported 2020-09-17 16:09:22 PDT
DFG should ensure there are PhantomLocals for the not-taken block of op_jneq_ptr
Attachments
Patch (3.58 KB, patch)
2020-09-17 16:14 PDT, Keith Miller
no flags
Patch (3.58 KB, patch)
2020-09-17 16:15 PDT, Keith Miller
no flags
Patch for landing (4.14 KB, patch)
2020-09-18 11:36 PDT, Keith Miller
no flags
Keith Miller
Comment 1 2020-09-17 16:14:09 PDT
Keith Miller
Comment 2 2020-09-17 16:15:23 PDT
Keith Miller
Comment 3 2020-09-17 16:15:41 PDT
Saam Barati
Comment 4 2020-09-18 10:46:50 PDT
Comment on attachment 409079 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409079&action=review > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:7175 > + flushForTerminalImpl(CodeOrigin(BytecodeIndex(m_currentIndex.offset() + relativeOffset), inlineCallFrame()), addFlushDirect, addPhantomLocalDirect); why not the current code origin?
Keith Miller
Comment 5 2020-09-18 10:57:38 PDT
Comment on attachment 409079 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409079&action=review >> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:7175 >> + flushForTerminalImpl(CodeOrigin(BytecodeIndex(m_currentIndex.offset() + relativeOffset), inlineCallFrame()), addFlushDirect, addPhantomLocalDirect); > > why not the current code origin? Because the set of live locals at the target is a subset of the locals live here. There's no point in Phantoming things that we don't need to.
Saam Barati
Comment 6 2020-09-18 11:01:43 PDT
Comment on attachment 409079 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409079&action=review >>> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:7175 >>> + auto addPhantomLocalDirect = [&] (InlineCallFrame*, Operand operand) { phantomLocalDirect(operand); }; >>> + flushForTerminalImpl(CodeOrigin(BytecodeIndex(m_currentIndex.offset() + relativeOffset), inlineCallFrame()), addFlushDirect, addPhantomLocalDirect); >> >> why not the current code origin? > > Because the set of live locals at the target is a subset of the locals live here. There's no point in Phantoming things that we don't need to. let's add the comment on why we flushForTerminal here, since we don't know if the target would've ended up doing it
Keith Miller
Comment 7 2020-09-18 11:36:28 PDT
Created attachment 409153 [details] Patch for landing
EWS
Comment 8 2020-09-18 12:34:26 PDT
Committed r267255: <https://trac.webkit.org/changeset/267255> All reviewed patches have been landed. Closing bug and clearing flags on attachment 409153 [details].
Radar WebKit Bug Importer
Comment 9 2020-09-18 12:35:16 PDT
Note You need to log in before you can comment on or make changes to this bug.