[PATCH] D72455: [NFC] Refactor TableGen for attributes

Tyker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 07:24:48 PST 2020


Tyker created this revision.
Tyker added reviewers: jdoerfert, thakis.
Herald added subscribers: llvm-commits, hiraditya, mgorny.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D72455

Files:
  llvm/include/llvm/IR/Attributes.h
  llvm/lib/IR/Attributes.cpp
  llvm/lib/IR/AttributesCompatFunc.td
  llvm/lib/IR/CMakeLists.txt
  llvm/lib/IR/Core.cpp
  llvm/utils/TableGen/Attributes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72455.237060.patch
Type: text/x-patch
Size: 8991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200109/78968f33/attachment.bin>


More information about the llvm-commits mailing list