RESOLVED FIXED 80779
All DFG nodes should have a mutable set of flags
https://bugs.webkit.org/show_bug.cgi?id=80779
Summary All DFG nodes should have a mutable set of flags
Filip Pizlo
Reported 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.
Attachments
the patch (53.43 KB, patch)
2012-03-10 22:32 PST, Filip Pizlo
webkit-ews: commit-queue-
the patch (54.63 KB, patch)
2012-03-10 22:45 PST, Filip Pizlo
no flags
the patch (54.63 KB, patch)
2012-03-11 19:45 PDT, Filip Pizlo
barraclough: review+
Filip Pizlo
Comment 1 2012-03-10 22:19:15 PST
Filip Pizlo
Comment 2 2012-03-10 22:32:35 PST
Created attachment 131205 [details] the patch
WebKit Review Bot
Comment 3 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.
Early Warning System Bot
Comment 4 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
Early Warning System Bot
Comment 5 2012-03-10 22:41:57 PST
Filip Pizlo
Comment 6 2012-03-10 22:45:24 PST
Created attachment 131206 [details] the patch Ooops, forgot about 32_64. This patch fixes that.
Filip Pizlo
Comment 7 2012-03-11 19:45:57 PDT
Created attachment 131273 [details] the patch Just rebased it.
Gavin Barraclough
Comment 8 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?
Filip Pizlo
Comment 9 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?
Gavin Barraclough
Comment 10 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.
Filip Pizlo
Comment 11 2012-03-12 02:50:55 PDT
Note You need to log in before you can comment on or make changes to this bug.