This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Add IndexAttr to primitive attributes kinds in tablegen.
ClosedPublic

Authored by ulysseB on Apr 15 2020, 5:00 AM.

Details

Summary

OpBase.td defined attributes kind for all integer types expect index. This
commit fixes that by adding an IndexAttr attribute kind.

Diff Detail

Event Timeline

ulysseB created this revision.Apr 15 2020, 5:00 AM
ftynse accepted this revision.Apr 15 2020, 5:33 AM
rriddle added inline comments.Apr 15 2020, 10:13 AM
mlir/test/IR/attribute.mlir
11

This doesn't test anything added here. You need to add IndexAttr to the definition of int_attrs(IntAttrOp) in TestOps.td.

rriddle accepted this revision.Apr 15 2020, 10:15 AM

LGTM, after fixing the test.

This revision is now accepted and ready to land.Apr 15 2020, 10:15 AM
ulysseB updated this revision to Diff 257959.Apr 15 2020, 10:38 PM
ulysseB marked an inline comment as done.

Fix the test.

Fixed the test.

This revision was automatically updated to reflect the committed changes.

Rolled this back in d9c7fc658d2befdca9cc147801abfe50cb364767, please run tests before pushing.

Pushed a fixed verison.