Provide a way to specify inliner's attribute compatibility and merging.
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 22 Dec 2015 23:57:37 +0000 (23:57 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Tue, 22 Dec 2015 23:57:37 +0000 (23:57 +0000)
commit37de9d09f15ab88c81c8112227956a7d3492a8cf
tree3ca38cdc8ef93646560b2764f84e641d03bbe333
parent12ba7a90641e4cc008ef0a97c7aadd87b04c9537
Provide a way to specify inliner's attribute compatibility and merging.

This reapplies r256277 with two changes:

- In emitFnAttrCompatCheck, change FuncName's type to std::string to fix
  a use-after-free bug.
- Remove an unnecessary install-local target in lib/IR/Makefile.

Original commit message for r252949:

Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256304 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Attributes.h
include/llvm/IR/Attributes.td
lib/Analysis/InlineCost.cpp
lib/IR/Attributes.cpp
lib/IR/AttributesCompatFunc.td
lib/IR/CMakeLists.txt
lib/IR/Makefile
lib/Transforms/IPO/Inliner.cpp
utils/TableGen/Attributes.cpp