[PATCH] D151416: [NFC][DAGCombiner]: Only consider nodes with no uses for pruning when forming initial worklist

Dhruv Chawla via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 03:18:59 PDT 2023


0xdc03 added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:181
+    /// which have no uses and all other nodes which would otherwise be added to
+    /// the worklist are already present in it during the initial formation.
     SmallSetVector<SDNode *, 32> PruningList;
----------------
nikic wrote:
> I'd move this comment next to the initial population of the worklist.
Done!


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1781
   for (SDNode &Node : DAG.allnodes())
-    AddToWorklist(&Node);
+    AddToWorklist(&Node, Node.use_empty());
 
----------------
nikic wrote:
> 
Done!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151416/new/

https://reviews.llvm.org/D151416



More information about the llvm-commits mailing list