WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176336
Make the distinction between entrypoints and CFG roots more clear by naming things better
https://bugs.webkit.org/show_bug.cgi?id=176336
Summary
Make the distinction between entrypoints and CFG roots more clear by naming t...
Saam Barati
Reported
2017-09-04 14:49:13 PDT
I think this will make the code easier cleaner, instead of just having comments stating that a particular field is only used in SSA.
Attachments
patch
(25.36 KB, patch)
2017-09-05 13:10 PDT
,
Saam Barati
mark.lam
: review+
Details
Formatted Diff
Diff
patch for landing
(25.57 KB, patch)
2017-09-05 13:47 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2017-09-05 12:40:21 PDT
The vector called m_entrypoints now I'm going to rename to m_roots. This represents the CFG roots. I'll also rename m_entrypointToArguments to m_rootToArguments. Similarly, I'll rename Graph::isEntrypoint to Graph::isRoot m_numberOfEntrypoints is only used in SSA, and I'll keep the same name. That field represents the number of logical entrypoints this compilation is making. It's not necessarily the number of CFG roots.
Saam Barati
Comment 2
2017-09-05 13:10:45 PDT
Created
attachment 319930
[details]
patch
Mark Lam
Comment 3
2017-09-05 13:13:34 PDT
Comment on
attachment 319930
[details]
patch r=me
Keith Miller
Comment 4
2017-09-05 13:16:14 PDT
Comment on
attachment 319930
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319930&action=review
r=me too.
> Source/JavaScriptCore/ChangeLog:17 > +
You should probably say that you renamed m_entrypoints to m_roots in the changelog.
Michael Saboff
Comment 5
2017-09-05 13:20:48 PDT
Comment on
attachment 319930
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319930&action=review
r=me. The code changes seem fine. Please update the ChangeLog.
> Source/JavaScriptCore/ChangeLog:16 > + Graph::m_numberOfEntrypoints is only used in SSA when compiling with > + EntrySwitch. It represents the logical number of entrypoints the compilation > + will end up with. Crucially, Graph::m_numberOfEntrypoints != Graph::m_roots.size(). > + This is the main reason I've renamed the fields and related methods.
I don't find changes to m_numberOfEntrypoints in the patch. It would be good to discuss the reasoning behind the change of m_entrypointToArguments to m_rootToArguments.
Saam Barati
Comment 6
2017-09-05 13:34:11 PDT
Comment on
attachment 319930
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=319930&action=review
>> Source/JavaScriptCore/ChangeLog:16 >> + This is the main reason I've renamed the fields and related methods. > > I don't find changes to m_numberOfEntrypoints in the patch. It would be good to discuss the reasoning behind the change of m_entrypointToArguments to m_rootToArguments.
This patch doesn't change m_numberOfEntrypoints on purpose. That field is retaining its name because it describes its purpose. Also, this patch renames m_entrypointToArguments to m_rootToArguments to be consistent with the change of m_entrypoints to m_roots.
>> Source/JavaScriptCore/ChangeLog:17 >> + > > You should probably say that you renamed m_entrypoints to m_roots in the changelog.
It says this above.
Saam Barati
Comment 7
2017-09-05 13:40:41 PDT
New changelog: This patch does renaming to make the distinction between Graph::m_entrypoints and Graph::m_numberOfEntrypoints more clear. The source of confusion is that Graph::m_entrypoints.size() is not equivalent to Graph::m_numberOfEntrypoints. Graph::m_entrypoints is really just the CFG roots. In CPS, this vector has size >= 1. In SSA, the size is always 1. This patch renames Graph::m_entrypoints to Graph::m_roots. To be consistent, this patch also renames Graph's m_entrypointToArguments field to m_rootToArguments. Graph::m_numberOfEntrypoints retains its name. This field is only used in SSA when compiling with EntrySwitch. It represents the logical number of entrypoints the compilation will end up with. Each EntrySwitch has m_numberOfEntrypoints cases.
Saam Barati
Comment 8
2017-09-05 13:47:52 PDT
Created
attachment 319932
[details]
patch for landing
WebKit Commit Bot
Comment 9
2017-09-05 14:30:09 PDT
Comment on
attachment 319932
[details]
patch for landing Clearing flags on attachment: 319932 Committed
r221637
: <
http://trac.webkit.org/changeset/221637
>
WebKit Commit Bot
Comment 10
2017-09-05 14:30:11 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2017-09-27 12:37:40 PDT
<
rdar://problem/34693633
>
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