Provide a way to specify inliner's attribute compatibility and merging.
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 22 Dec 2015 20:00:05 +0000 (20:00 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Tue, 22 Dec 2015 20:00:05 +0000 (20:00 +0000)
commita4912f57559181c6ba848114c6e524fe62368fcb
tree8dc5f7acc3ebb177a4e7a604cd472e42377f3e4d
parent937ba4cad8c9d5c8d5d2de06e535299a85ff42c6
Provide a way to specify inliner's attribute compatibility and merging.

This reapplies r252990 and r252949. I've added member function getKind
to the Attr classes which returns the enum or string of the attribute.

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@256277 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/CMakeLists.txt
lib/IR/Makefile
lib/Transforms/IPO/Inliner.cpp
utils/TableGen/Attributes.cpp