Provide a way to specify inliner's attribute compatibility and merging.
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 13 Nov 2015 01:23:11 +0000 (01:23 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 13 Nov 2015 01:23:11 +0000 (01:23 +0000)
commit2069c3c89830b66457f1a9559fba98d20702ad64
tree7248ed54d1eabe1e7c56c50b950c0c25c34478a8
parente1fbc7e8ba9d122db73e505c52221a002817df36
Provide a way to specify inliner's attribute compatibility and merging.

This reapplies r252949. I've changed the type of FuncName to be
std::string instead of StringRef in emitFnAttrCompatCheck.

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@252990 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 [new file with mode: 0644]
lib/IR/CMakeLists.txt
lib/IR/Makefile
lib/Transforms/IPO/Inliner.cpp
utils/TableGen/Attributes.cpp