This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Add static getMaxNumOperands function to SDNode.
ClosedPublic

Authored by fhahn on Jan 17 2019, 8:44 AM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Jan 17 2019, 8:44 AM
arsenm added a subscriber: arsenm.Jan 17 2019, 8:47 AM

What's this for?

fhahn updated this revision to Diff 182306.Jan 17 2019, 8:55 AM
fhahn edited the summary of this revision. (Show Details)

Update places to use getMaxNumOperands, add more context to description.

What's this for?

To remove magic numbers in D56739

fhahn marked an inline comment as done.Jan 17 2019, 9:02 AM
fhahn added inline comments.
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
9269 ↗(On Diff #182306)

typo sneaked in, 'll fix that.

fhahn updated this revision to Diff 182309.Jan 17 2019, 9:14 AM

Fix typo.

RKSimon accepted this revision.Jan 17 2019, 12:44 PM

LGTM - thanks

This revision is now accepted and ready to land.Jan 17 2019, 12:44 PM
This revision was automatically updated to reflect the committed changes.