Bug 80779 - All DFG nodes should have a mutable set of flags
Summary: All DFG nodes should have a mutable set of flags
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 80819 80824
  Show dependency treegraph
 
Reported: 2012-03-10 22:09 PST by Filip Pizlo
Modified: 2012-03-12 02:50 PDT (History)
5 users (show)

See Also:


Attachments
the patch (53.43 KB, patch)
2012-03-10 22:32 PST, Filip Pizlo
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
the patch (54.63 KB, patch)
2012-03-10 22:45 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (54.63 KB, patch)
2012-03-11 19:45 PDT, Filip Pizlo
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2012-03-10 22:09:39 PST
Currently some nodes have a mutable set of arithmetic use flags, and all nodes have a mostly-immutable set of flags baked into their opcode.

Instead, the opcode should be a 16-bit quantity that does not include any flags, and separately, there should be a 16-bit flags that combines the current flags-that-are-in-the-opcode and the arithmetic flags.

This will facilitate richer backward flow analyses and should make manipulating the DFG IR generally easier.
Comment 1 Filip Pizlo 2012-03-10 22:19:15 PST
<rdar://problem/11026218>
Comment 2 Filip Pizlo 2012-03-10 22:32:35 PST
Created attachment 131205 [details]
the patch
Comment 3 WebKit Review Bot 2012-03-10 22:35:04 PST
Attachment 131205 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/CMakeLists.txt', u'S..." exit_code: 1
Source/JavaScriptCore/dfg/DFGNode.h:114:  The parameter name "flags" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Early Warning System Bot 2012-03-10 22:40:52 PST
Comment on attachment 131205 [details]
the patch

Attachment 131205 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/11936304
Comment 5 Early Warning System Bot 2012-03-10 22:41:57 PST
Comment on attachment 131205 [details]
the patch

Attachment 131205 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11939311
Comment 6 Filip Pizlo 2012-03-10 22:45:24 PST
Created attachment 131206 [details]
the patch

Ooops, forgot about 32_64.  This patch fixes that.
Comment 7 Filip Pizlo 2012-03-11 19:45:57 PDT
Created attachment 131273 [details]
the patch

Just rebased it.
Comment 8 Gavin Barraclough 2012-03-11 23:09:17 PDT
There is an awful lot of static_cast<NodeType>(node.op) in this patch.  It would be really good to make op private (& probably should be called m_op), and change op() to be an accessor function returning a NodeType.  Would probably be nice to do the same for flags.  What do you think?
Comment 9 Filip Pizlo 2012-03-11 23:14:13 PDT
(In reply to comment #8)
> There is an awful lot of static_cast<NodeType>(node.op) in this patch.  It would be really good to make op private (& probably should be called m_op), and change op() to be an accessor function returning a NodeType.  Would probably be nice to do the same for flags.  What do you think?

I'm with you!

I had avoided doing that because I had already racked up 50kb of changes.  I feared that privatizing Node::op will introduce even more changes.

I want to make that change and would be happy to do it in this patch.  But how would you feel about that being a follow-on patch?
Comment 10 Gavin Barraclough 2012-03-12 01:36:14 PDT
> I want to make that change and would be happy to do it in this patch.  But how would you feel about that being a follow-on patch?

That works for me.
Comment 11 Filip Pizlo 2012-03-12 02:50:55 PDT
Landed in http://trac.webkit.org/changeset/110419