This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Refactor TableGen for attributes
ClosedPublic

Authored by Tyker on Jan 9 2020, 7:23 AM.

Details

Summary

this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes: make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Diff Detail

Event Timeline

Tyker created this revision.Jan 9 2020, 7:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2020, 7:23 AM

I think this is fine but I'll wait another day for input before I accept.

Aaron should probably review this.

aaron.ballman accepted this revision.Jan 11 2020, 10:39 AM

Aaron should probably review this.

Happy to do so, but I mostly focus on attributes in the frontend rather than the backend.

LGTM!

This revision is now accepted and ready to land.Jan 11 2020, 10:39 AM
This revision was automatically updated to reflect the committed changes.
llvm/lib/IR/Attributes.cpp