This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Allow intrinsics to have up to 8 return values.
ClosedPublic

Authored by tra on Oct 6 2017, 9:37 AM.

Details

Summary

The change is needed for my upcoming changes to NVPTX back-end that implement an intrinsic that has up to 8 output values.

Event Timeline

tra created this revision.Oct 6 2017, 9:37 AM
tra added reviewers: jlebar, rnk.Oct 6 2017, 9:44 AM
jlebar accepted this revision.Oct 6 2017, 11:25 AM
jlebar added inline comments.
llvm/lib/IR/Function.cpp
655

Is there a reason not to put these consecutive with struct5?

This revision is now accepted and ready to land.Oct 6 2017, 11:25 AM
tra added inline comments.Oct 6 2017, 1:01 PM
llvm/lib/IR/Function.cpp
655

Caution mostly. If enum has explicitly assigned values, I assume that someone somewhere relies on them being exactly those values and it's prudent to extend the range rather than change existing order.

tra updated this revision to Diff 118299.Oct 9 2017, 5:20 PM

Fixed another place where we're checking the number of fields in a struct.

tra updated this revision to Diff 118506.Oct 10 2017, 5:14 PM

Ugh. Make sure static array to keep per-field info is also sized properly.

tra updated this revision to Diff 118631.Oct 11 2017, 9:40 AM

Replaced fixed-size array with SmallVector<>. One less place for making potential buffer overflow error when struct encoding changes.

rnk accepted this revision.Oct 11 2017, 11:07 AM

Looks good!

This revision was automatically updated to reflect the committed changes.