[PATCH] D61397: [DAGCombiner] Avoid creating large tokenfactors in visitTokenFactor

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 09:45:21 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL360171: [DAGCombiner] Avoid creating large tokenfactors in visitTokenFactor (authored by fhahn, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D61397?vs=198004&id=198493#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D61397

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp


Index: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1792,8 +1792,9 @@
   TFs.push_back(N);
 
   // Iterate through token factors.  The TFs grows when new token factors are
-  // encountered.
-  for (unsigned i = 0; i < TFs.size(); ++i) {
+  // encountered. Limit number of nodes to inline, to avoid quadratic compile
+  // times.
+  for (unsigned i = 0; i < TFs.size() && Ops.size() <= 2048; ++i) {
     SDNode *TF = TFs[i];
 
     // Check each of the operands.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61397.198493.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190507/c7cb38ad/attachment.bin>


More information about the llvm-commits mailing list