DFG SSA shouldn't have SetArgument nodes
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Feb 2015 23:37:39 +0000 (23:37 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Feb 2015 23:37:39 +0000 (23:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141342

Reviewed by Mark Lam.

I was wondering why we kept the SetArgument around for captured
variables. It turns out we did so because we thought we had to, even
though we didn't have to. The node is meaningless in SSA.

* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179767 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSSAConversionPhase.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp

index 08c3122..de0b699 100644 (file)
@@ -1,5 +1,21 @@
 2015-02-06  Filip Pizlo  <fpizlo@apple.com>
 
+        DFG SSA shouldn't have SetArgument nodes
+        https://bugs.webkit.org/show_bug.cgi?id=141342
+
+        Reviewed by Mark Lam.
+
+        I was wondering why we kept the SetArgument around for captured
+        variables. It turns out we did so because we thought we had to, even
+        though we didn't have to. The node is meaningless in SSA.
+
+        * dfg/DFGSSAConversionPhase.cpp:
+        (JSC::DFG::SSAConversionPhase::run):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::compileNode):
+
+2015-02-06  Filip Pizlo  <fpizlo@apple.com>
+
         It should be possible to use the DFG SetArgument node to indicate that someone set the value of a local out-of-band
         https://bugs.webkit.org/show_bug.cgi?id=141337
 
index 9433a79..03246f3 100644 (file)
@@ -198,8 +198,7 @@ public:
         //   - PhantomLocal becomes Phantom, and its child is whatever is specified by
         //     valueForOperand.
         //
-        //   - SetArgument is removed unless it's a captured variable. Note that GetArgument nodes
-        //     have already been inserted.
+        //   - SetArgument is removed. Note that GetArgument nodes have already been inserted.
         Operands<Node*> valueForOperand(OperandsLike, m_graph.block(0)->variablesAtHead);
         for (BasicBlock* block : m_graph.blocksInPreOrder()) {
             valueForOperand.clear();
@@ -334,9 +333,6 @@ public:
                 }
                     
                 case SetArgument: {
-                    VariableAccessData* variable = node->variableAccessData();
-                    if (variable->isCaptured())
-                        break;
                     node->convertToPhantom();
                     break;
                 }
index f52ad55..e57537c 100644 (file)
@@ -735,7 +735,6 @@ private:
             break;
 
         case PhantomLocal:
-        case SetArgument:
         case LoopHint:
         case VariableWatchpoint:
         case FunctionReentryWatchpoint: