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 179765
Provide a runtime option for disabling the optimization of recursive tail calls
https://bugs.webkit.org/show_bug.cgi?id=179765
Summary
Provide a runtime option for disabling the optimization of recursive tail calls
Robin Morisset
Reported
2017-11-16 06:58:15 PST
This should make benchmarking and debugging this optimization a bit less painful. Name of the option: optimizeRecursiveTailCalls
Attachments
Patch
(4.87 KB, patch)
2017-11-16 06:59 PST
,
Robin Morisset
no flags
Details
Formatted Diff
Diff
Patch for landing
(4.88 KB, patch)
2017-11-16 07:17 PST
,
Robin Morisset
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Robin Morisset
Comment 1
2017-11-16 06:59:36 PST
Created
attachment 327060
[details]
Patch
Mark Lam
Comment 2
2017-11-16 07:04:07 PST
Comment on
attachment 327060
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=327060&action=review
r=me
> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1318 > + if (Options::optimizeRecursiveTailCalls()) {
I suggest making this: if (LIKELY(Options::optimizeRecursiveTailCalls())) {
> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1425 > + if (!Options::optimizeRecursiveTailCalls())
I suggest making this: if (UNLIKELY(!Options::optimizeRecursiveTailCalls()))
Robin Morisset
Comment 3
2017-11-16 07:17:10 PST
Created
attachment 327062
[details]
Patch for landing
WebKit Commit Bot
Comment 4
2017-11-16 07:48:15 PST
Comment on
attachment 327062
[details]
Patch for landing Clearing flags on attachment: 327062 Committed
r224918
: <
https://trac.webkit.org/changeset/224918
>
WebKit Commit Bot
Comment 5
2017-11-16 07:48:16 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2017-11-16 07:49:27 PST
<
rdar://problem/35588622
>
Saam Barati
Comment 7
2017-11-16 08:18:41 PST
Comment on
attachment 327062
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=327062&action=review
> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1425 > + if (UNLIKELY(!Options::optimizeRecursiveTailCalls()))
Why reference this option anywhere else? Isn’t it only here that we care?
Robin Morisset
Comment 8
2017-11-16 08:42:39 PST
(In reply to Saam Barati from
comment #7
)
> Comment on
attachment 327062
[details]
> Patch for landing > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=327062&action=review
> > > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1425 > > + if (UNLIKELY(!Options::optimizeRecursiveTailCalls())) > > Why reference this option anywhere else? Isn’t it only here that we care?
The other two places where we reference this option take care of splitting the entry block for functions that have at least one tail call, so the optimisation has somewhere to jump to. I decided to also make them conditional on the option, to make it easier to benchmark cleanly the cost incurred by this.
Saam Barati
Comment 9
2017-11-16 09:16:49 PST
(In reply to Robin Morisset from
comment #8
)
> (In reply to Saam Barati from
comment #7
) > > Comment on
attachment 327062
[details]
> > Patch for landing > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=327062&action=review
> > > > > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1425 > > > + if (UNLIKELY(!Options::optimizeRecursiveTailCalls())) > > > > Why reference this option anywhere else? Isn’t it only here that we care? > > The other two places where we reference this option take care of splitting > the entry block for functions that have at least one tail call, so the > optimisation has somewhere to jump to. > I decided to also make them conditional on the option, to make it easier to > benchmark cleanly the cost incurred by this.
👍🏼
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