[PATCH] D55073: [SelectionDAG] Split very large token factors for loads into 64k chunks

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 29 15:01:48 PST 2018


efriedma added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1052
+    Root =
+        DAG.getNode(ISD::TokenFactor, getCurSDLoc(), MVT::Other, TokenFactors);
+  }
----------------
aemerson wrote:
> efriedma wrote:
> > Instead of making a tree of TokenFactors, could you make a list?  It seems a little simpler (less code, and you don't have to worry about the length of TokenFactors itself).
> > 
> > I'm a little worried that other code dealing with TokenFactors might end up violating the limit if we're very close... any idea if there's other code that could be affected, like DAGCombine?  Do we have an assertion somewhere that will reliably catch this issue?
> Could you clarify what you mean by list?
I mean, each TokenFactor should only have one TokenFactor operand.  So the algorithm would be something like this: remove "Limit" loads from end of PendingLoads, make a TokenFactor, and append the resulting TokenFactor to PendingLoads.  Repeat as necessary.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55073





More information about the llvm-commits mailing list