[SelectionDAG] Add static getMaxNumOperands function to SDNode.

Summary:
Use this helper to make sure we use the same value at various places.
This will likely be needed at more places were we currently crash
because we use more operands than possible.

Also makes it easier to change in the future.

Reviewers: RKSimon, craig.topper, efriedma, aemerson

Reviewed By: RKSimon

Subscribers: hiraditya, arsenm, llvm-commits

Differential Revision: https://reviews.llvm.org/D56859

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351537 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed