[PATCH] D56859: [SelectionDAG] Add static getMaxNumOperands function to SDNode.

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


fhahn created this revision.
fhahn added reviewers: RKSimon, craig.topper, efriedma, aemerson.

https://reviews.llvm.org/D56859

Files:
  llvm/include/llvm/CodeGen/SelectionDAGNodes.h


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -898,6 +898,11 @@
   /// Return the number of values used by this operation.
   unsigned getNumOperands() const { return NumOperands; }
 
+  /// Return the maximum number of operands that a SDNode can hold.
+  static constexpr size_t getMaxNumOperands() {
+    return std::numeric_limits<decltype(SDNode::NumOperands)>::max();
+  }
+
   /// Helper method returns the integer value of a ConstantSDNode operand.
   inline uint64_t getConstantOperandVal(unsigned Num) const;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56859.182302.patch
Type: text/x-patch
Size: 698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190117/2f5ae690/attachment.bin>


More information about the llvm-commits mailing list