[PATCH] D56739: [SelectionDAG] Add getTokenFactor, which splits nodes with > 64k operands.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 17 08:48:10 PST 2019


fhahn marked 2 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:9291
+SDValue SelectionDAG::getTokenFactor(const SDLoc &DL,
+                                     SmallVector<SDValue, 8> &Vals) {
+  size_t Limit = std::numeric_limits<decltype(SDNode::NumOperands)>::max();
----------------
RKSimon wrote:
> Maybe better to use an ArrayRef<SDValue> here instead of modifying an external value?
The reason it modifies an external value is that it allows us to nicely collapse the incoming values into TokenFactors, without needing to allocate an additional array. I changed it to take a SmallVectorImpl, to make it more generic. Does that make sense?


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

https://reviews.llvm.org/D56739





More information about the llvm-commits mailing list