[PATCH] D58070: [DAGCombine] Prune unnused nodes.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 09:36:26 PDT 2019


jyknight accepted this revision.
jyknight added a comment.
This revision is now accepted and ready to land.

It'd be nice if we knew why adding new nodes to the worklist seemed to cause an issue, but the reduced form as here seems okay as far as it goes.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:696-697
 
-  // This should eventually be pruning.
-  void NodeInserted(SDNode *N) override { }
+  // FIXME: Ideally we could add N to the worklist, but this causes exponential
+  //        compile time costs in large DAGs, e.g. Halide.
+  void NodeInserted(SDNode *N) override { DC.ConsiderForPruning(N); }
----------------
Might be infinite loop, not exponential time?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D58070





More information about the llvm-commits mailing list