WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
118957
fourthTier: It should be easy to figure out which blocks nodes belong to
https://bugs.webkit.org/show_bug.cgi?id=118957
Summary
fourthTier: It should be easy to figure out which blocks nodes belong to
Filip Pizlo
Reported
2013-07-21 15:38:54 PDT
Patch forthcoming.
Attachments
the patch
(2.40 KB, patch)
2013-07-21 16:10 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(3.18 KB, patch)
2013-07-21 20:43 PDT
,
Filip Pizlo
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2013-07-21 16:10:37 PDT
Created
attachment 207217
[details]
the patch
Sam Weinig
Comment 2
2013-07-21 18:17:11 PDT
Comment on
attachment 207217
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=207217&action=review
> Source/JavaScriptCore/dfg/DFGNode.h:1404 > union { > Node* replacement; > + BasicBlock* owner; > } misc;
Can you add clarification about what ensures that a node only has either a replacement or an owner.
Filip Pizlo
Comment 3
2013-07-21 20:40:54 PDT
(In reply to
comment #2
)
> (From update of
attachment 207217
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=207217&action=review
> > > Source/JavaScriptCore/dfg/DFGNode.h:1404 > > union { > > Node* replacement; > > + BasicBlock* owner; > > } misc; > > Can you add clarification about what ensures that a node only has either a replacement or an owner.
It's not like that. These fields only become valid if you initialize them. You have to make up your mind, when you initialize them, whether your phase needs to use replacement, or needs to know the node-to-block mapping. Most phases need neither of these pieces of information. Only three phases use replacements, and the only phases that will use owners are LICM and possibly GVN.
Filip Pizlo
Comment 4
2013-07-21 20:43:37 PDT
Created
attachment 207222
[details]
the patch
Sam Weinig
Comment 5
2013-07-21 20:44:27 PDT
Comment on
attachment 207217
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=207217&action=review
>>> Source/JavaScriptCore/dfg/DFGNode.h:1404 >>> } misc; >> >> Can you add clarification about what ensures that a node only has either a replacement or an owner. > > It's not like that. These fields only become valid if you initialize them. You have to make up your mind, when you initialize them, whether your phase needs to use replacement, or needs to know the node-to-block mapping. Most phases need neither of these pieces of information. Only three phases use replacements, and the only phases that will use owners are LICM and possibly GVN.
Ok. You probably want to add some indication of that (or an assertion if possible), as it wasn't clear.
Sam Weinig
Comment 6
2013-07-21 20:45:12 PDT
(In reply to
comment #5
)
> (From update of
attachment 207217
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=207217&action=review
> > >>> Source/JavaScriptCore/dfg/DFGNode.h:1404 > >>> } misc; > >> > >> Can you add clarification about what ensures that a node only has either a replacement or an owner. > > > > It's not like that. These fields only become valid if you initialize them. You have to make up your mind, when you initialize them, whether your phase needs to use replacement, or needs to know the node-to-block mapping. Most phases need neither of these pieces of information. Only three phases use replacements, and the only phases that will use owners are LICM and possibly GVN. > > Ok. You probably want to add some indication of that (or an assertion if possible), as it wasn't clear.
Moments later, you updated it! r=me.
Filip Pizlo
Comment 7
2013-07-21 20:48:40 PDT
(In reply to
comment #5
)
> (From update of
attachment 207217
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=207217&action=review
> > >>> Source/JavaScriptCore/dfg/DFGNode.h:1404 > >>> } misc; > >> > >> Can you add clarification about what ensures that a node only has either a replacement or an owner. > > > > It's not like that. These fields only become valid if you initialize them. You have to make up your mind, when you initialize them, whether your phase needs to use replacement, or needs to know the node-to-block mapping. Most phases need neither of these pieces of information. Only three phases use replacements, and the only phases that will use owners are LICM and possibly GVN. > > Ok. You probably want to add some indication of that (or an assertion if possible), as it wasn't clear.
I don't think an assertion is either possible or profitable - we don't have any kind of natural way of checking if a pointer points to a Node or a BasicBlock. Also, each phase first initializes 'misc', and then uses it, often in a very obvious way. Like, you'll literally see one loop that initializes them and another loop that uses them.
Filip Pizlo
Comment 8
2013-07-21 20:57:03 PDT
Landed in
http://trac.webkit.org/changeset/152958
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