WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 122704
Baseline JIT should use the DFG's PutById IC
https://bugs.webkit.org/show_bug.cgi?id=122704
Summary
Baseline JIT should use the DFG's PutById IC
Filip Pizlo
Reported
2013-10-12 16:37:21 PDT
Patch forthcoming.
Attachments
it begins
(12.32 KB, patch)
2013-10-12 16:37 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
slowly but surely...
(17.74 KB, patch)
2013-10-13 14:06 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
small steps
(21.84 KB, patch)
2013-10-13 14:49 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
almost works
(29.03 KB, patch)
2013-10-13 18:56 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(84.87 KB, patch)
2013-10-13 20:52 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(87.59 KB, patch)
2013-10-13 21:16 PDT
,
Filip Pizlo
mhahnenberg
: review+
Details
Formatted Diff
Diff
PerformanceTestsResults for Dromaeo/jslib-event-jquery
(22.11 KB, text/html)
2013-10-15 12:09 PDT
,
Ryosuke Niwa
no flags
Details
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2013-10-12 16:37:48 PDT
Created
attachment 214068
[details]
it begins
Filip Pizlo
Comment 2
2013-10-13 14:06:27 PDT
Created
attachment 214110
[details]
slowly but surely...
Oliver Hunt
Comment 3
2013-10-13 14:13:25 PDT
Comment on
attachment 214110
[details]
slowly but surely... View in context:
https://bugs.webkit.org/attachment.cgi?id=214110&action=review
> Source/JavaScriptCore/jit/JIT.h:260 > + : m_type(PutById) > + , bytecodeIndex(bytecodeIndex) > + , structureToCompare(structureToCompare) > + , strucureCheck(structureCheck) > + , propertyStorageLoad(propertyStorageLoad) > +#if USE(JSVALUE64) > + , putDisplacementLabel(displacementLabel) > +#else > + , putDisplacementLabel1(displacementLabel1) > + , putDisplacementLabel2(displacementLabel2) > +#endif > + , done(done)
indent or the style bot will complain
> Source/JavaScriptCore/jit/JIT.h:268 > - getColdPathBegin = coldPathBegin; > + this->coldPathBegin = coldPathBegin;
Can we just rename the members to be m_... ? (I'm okay with not doing in this patch if there's a pile of usages that make it awful to change)
> Source/JavaScriptCore/jit/JITPropertyAccess.cpp:-610 > - BEGIN_UNINTERRUPTED_SEQUENCE(sequencePutById);
Do we still need BEGIN/END_UNINTERRUPTED_SEQUENCE ? The branch compactor uses (used to?) use these to indicate branches that could not be rewritten. If it has better handling now, yay!
Filip Pizlo
Comment 4
2013-10-13 14:31:30 PDT
(In reply to
comment #3
)
> (From update of
attachment 214110
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=214110&action=review
> > > Source/JavaScriptCore/jit/JIT.h:260 > > + : m_type(PutById) > > + , bytecodeIndex(bytecodeIndex) > > + , structureToCompare(structureToCompare) > > + , strucureCheck(structureCheck) > > + , propertyStorageLoad(propertyStorageLoad) > > +#if USE(JSVALUE64) > > + , putDisplacementLabel(displacementLabel) > > +#else > > + , putDisplacementLabel1(displacementLabel1) > > + , putDisplacementLabel2(displacementLabel2) > > +#endif > > + , done(done) > > indent or the style bot will complain
No it won't ... this is already indented the same way as the other constructor overloads.
> > > Source/JavaScriptCore/jit/JIT.h:268 > > - getColdPathBegin = coldPathBegin; > > + this->coldPathBegin = coldPathBegin; > > Can we just rename the members to be m_... ? (I'm okay with not doing in this patch if there's a pile of usages that make it awful to change)
I don't think it would be a good idea to make this change anytime soon. This patch is an incremental step towards getting rid of the baseline JIT's IC logic entirely. So, doing refactorings to "clean up" that logic in the middle of getting rid of it sounds like it might be a waste of time.
> > > Source/JavaScriptCore/jit/JITPropertyAccess.cpp:-610 > > - BEGIN_UNINTERRUPTED_SEQUENCE(sequencePutById); > > Do we still need BEGIN/END_UNINTERRUPTED_SEQUENCE ? The branch compactor uses (used to?) use these to indicate branches that could not be rewritten. If it has better handling now, yay!
The DFG JIT doesn't use it, so I'm assuming not.
Filip Pizlo
Comment 5
2013-10-13 14:49:19 PDT
Created
attachment 214115
[details]
small steps I should just have this done by now but I'm feeling sooooper lazy.
Filip Pizlo
Comment 6
2013-10-13 18:56:22 PDT
Created
attachment 214120
[details]
almost works Need to change the JITOperations for PutById to take EncodedJSValue for the base rather than JSCell*. Also need to kill the old Baseline JIT put_by_id IC code, since that's now unused.
Filip Pizlo
Comment 7
2013-10-13 20:52:39 PDT
Created
attachment 214124
[details]
the patch
WebKit Commit Bot
Comment 8
2013-10-13 20:54:20 PDT
Attachment 214124
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/bytecode/CodeBlock.cpp', u'Source/JavaScriptCore/bytecode/PutByIdStatus.cpp', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp', u'Source/JavaScriptCore/jit/JIT.cpp', u'Source/JavaScriptCore/jit/JIT.h', u'Source/JavaScriptCore/jit/JITInlines.h', u'Source/JavaScriptCore/jit/JITOperationWrappers.h', u'Source/JavaScriptCore/jit/JITOperations.cpp', u'Source/JavaScriptCore/jit/JITOperations.h', u'Source/JavaScriptCore/jit/JITPropertyAccess.cpp', u'Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp', u'Source/JavaScriptCore/jit/JITStubs.cpp', u'Source/JavaScriptCore/jit/JITStubs.h', u'Source/JavaScriptCore/jit/Repatch.cpp']" exit_code: 1 Source/JavaScriptCore/jit/JITPropertyAccess.cpp:612: Missing space after , [whitespace/comma] [3] Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:553: Missing space after , [whitespace/comma] [3] Total errors found: 2 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 9
2013-10-13 21:05:12 PDT
(In reply to
comment #8
)
>
Attachment 214124
[details]
did not pass style-queue: > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/bytecode/CodeBlock.cpp', u'Source/JavaScriptCore/bytecode/PutByIdStatus.cpp', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp', u'Source/JavaScriptCore/jit/JIT.cpp', u'Source/JavaScriptCore/jit/JIT.h', u'Source/JavaScriptCore/jit/JITInlines.h', u'Source/JavaScriptCore/jit/JITOperationWrappers.h', u'Source/JavaScriptCore/jit/JITOperations.cpp', u'Source/JavaScriptCore/jit/JITOperations.h', u'Source/JavaScriptCore/jit/JITPropertyAccess.cpp', u'Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp', u'Source/JavaScriptCore/jit/JITStubs.cpp', u'Source/JavaScriptCore/jit/JITStubs.h', u'Source/JavaScriptCore/jit/Repatch.cpp']" exit_code: 1 > Source/JavaScriptCore/jit/JITPropertyAccess.cpp:612: Missing space after , [whitespace/comma] [3] > Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp:553: Missing space after , [whitespace/comma] [3]
Oops, fixed.
> Total errors found: 2 in 14 files > > > If any of these errors are false positives, please file a bug against check-webkit-style.
I think this patch will break all of 32 bit. Working on a fix.
Filip Pizlo
Comment 10
2013-10-13 21:16:30 PDT
Created
attachment 214125
[details]
the patch
Mark Hahnenberg
Comment 11
2013-10-14 10:54:55 PDT
Comment on
attachment 214125
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=214125&action=review
r=me
> Source/JavaScriptCore/jit/JIT.h:229 > : m_type(PutById) > , bytecodeIndex(bytecodeIndex) > , hotPathBegin(hotPathBegin) > + , structureToCompare(structureToCompare) > , propertyStorageLoad(propertyStorageLoad) > - , putStructureToCompare(structureToCompare) > #if USE(JSVALUE64) > , putDisplacementLabel(displacementLabel)
You said you wanted to remove this constructor.
Filip Pizlo
Comment 12
2013-10-14 11:38:58 PDT
Landed in
http://trac.webkit.org/changeset/157411
Ryosuke Niwa
Comment 13
2013-10-15 01:59:36 PDT
This may have improved Dromaeo/jslib-event-jquery's score by ~28%:
https://perf.webkit.org/#mode=charts&chartList=%5B%5B%22mac-lion%22%2C%22Dromaeo%2Fjslib-event-jquery%3ARuns%22%5D%2C%5B%22mac-mountainlion%22%2C%22Dromaeo%2Fjslib-event-jquery%3ARuns%22%5D%2C%5B%22mac-mountainlion%22%2C%22Dromaeo%2Fjslib-event-prototype%3ARuns%22%5D%2C%5B%22mac-lion%22%2C%22Dromaeo%2Fjslib-event-prototype%3ARuns%22%5D%5D&days=52&zoom=%5B1381585431357.5227%2C1381827392596%5D
Ryosuke Niwa
Comment 14
2013-10-15 12:09:43 PDT
Created
attachment 214291
[details]
PerformanceTestsResults for Dromaeo/jslib-event-jquery (In reply to
comment #13
)
> This may have improved Dromaeo/jslib-event-jquery's score by ~28%: >
https://perf.webkit.org/#mode=charts&chartList=%5B%5B%22mac-lion%22%2C%22Dromaeo%2Fjslib-event-jquery%3ARuns%22%5D%2C%5B%22mac-mountainlion%22%2C%22Dromaeo%2Fjslib-event-jquery%3ARuns%22%5D%2C%5B%22mac-mountainlion%22%2C%22Dromaeo%2Fjslib-event-prototype%3ARuns%22%5D%2C%5B%22mac-lion%22%2C%22Dromaeo%2Fjslib-event-prototype%3ARuns%22%5D%5D&days=52&zoom=%5B1381585431357.5227%2C1381827392596%5D
Confirmed.
Gavin Barraclough
Comment 15
2013-10-15 12:27:40 PDT
nice!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug