This is an archive of the discontinued LLVM Phabricator instance.

Support REG_SEQUENCE in tablegen.
ClosedPublic

Authored by arsenm on Nov 1 2014, 9:27 PM.

Details

Reviewers
hfinkel
Summary

The problem is mostly that variadic output instruction
aren't handled, so it is rejected for having an inconsistent
number of operands, and then the right number of operands
isn't emitted.

I'm not particularly confident in custom typechecking for the
operands since it seems more complicated than it should be.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 15674.Nov 1 2014, 9:27 PM
arsenm retitled this revision from to Support REG_SEQUENCE in tablegen. .
arsenm updated this object.
arsenm edited the test plan for this revision. (Show Details)
arsenm added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Nov 1 2014, 10:40 PM
hfinkel added a reviewer: hfinkel.
hfinkel added a subscriber: hfinkel.

I think that this looks fine (aside from some minor things); the custom type-checking code looks about like what I'd expect.

utils/TableGen/CodeGenDAGPatterns.cpp
1706

Remove this assert (getNumChildren returns an unsigned value anyhow, so NChild should be unsigned too).

1726

Please get the operand number in there.

1790

Don't need {} here (and you could merge this new condition into the existing if.

utils/TableGen/DAGISelMatcherGen.cpp
758

It is is -> If it is

820

Don't need {} here.

This revision is now accepted and ready to land.Nov 1 2014, 10:40 PM
arsenm added inline comments.Nov 2 2014, 3:53 PM
utils/TableGen/CodeGenDAGPatterns.cpp
1790

Merged, and changed to the correct isVariadic which I missed before.

utils/TableGen/DAGISelMatcherGen.cpp
820

clang-format and I disagree here

arsenm closed this revision.Nov 2 2014, 3:57 PM

r221117