[PATCH] [Inliner] Use whitelist instead of blacklist when checking function attribute compatibility and make the check stricter

Akira Hatanaka ahatanak at gmail.com
Thu Apr 23 14:33:49 PDT 2015


Update patch attached.

The following are the changes I made to the table-gen file:

- Added attributes classes which derive from the base class. This enables distinguishing enum attributes from string attributes and key-value attributes from attributes that don't have values.
- Added target-independent string attributes. Inliner uses these attributes to check caller-callee compatibility.
- Added two classes to describe function inlining rules.

I'm mainly interested in whether the table-gen syntax is easy to understand and is expressive enough to describe most of the inlining rules that are not so complex. Also, as I mentioned before, I think it's possible to make some improvements to it later so that it can be used to auto-generate code for other passes (e.g., IR verifier) or for documentation.


http://reviews.llvm.org/D7802

Files:
  include/llvm/Analysis/InlineCost.h
  include/llvm/IR/Attributes.h
  include/llvm/IR/Attributes.td
  lib/Analysis/IPA/InlineCost.cpp
  lib/IR/Attributes.cpp
  lib/IR/Makefile
  test/Transforms/Inline/attributes.ll
  utils/TableGen/Attribute.cpp
  utils/TableGen/TableGen.cpp
  utils/TableGen/TableGenBackends.h

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7802.24333.patch
Type: text/x-patch
Size: 22566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150423/66010edd/attachment.bin>


More information about the llvm-commits mailing list