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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 17 13:18:22 PST 2019


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

LGTM



================
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();
----------------
fhahn wrote:
> 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?
I understand, I'm still a little worried but given how infrequent this is likely to be called it should be OK.


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

https://reviews.llvm.org/D56739





More information about the llvm-commits mailing list