summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2015-12-22 20:00:05 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2015-12-22 20:00:05 +0000
commita61deb249ba13fbbb80a4927e0c619f54e62ee30 (patch)
treeb2a43eb3986c7b8c9b769a52d6e9401570db44ad /llvm/lib/Analysis
parent5349d87a69dfef34a6538aff082775da19be8e88 (diff)
downloadbcm5719-llvm-a61deb249ba13fbbb80a4927e0c619f54e62ee30.tar.gz
bcm5719-llvm-a61deb249ba13fbbb80a4927e0c619f54e62ee30.zip
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 llvm-svn: 256277
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index cebc8731d4d..7155c149867 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -1362,9 +1362,7 @@ static bool functionsHaveCompatibleAttributes(Function *Caller,
Function *Callee,
TargetTransformInfo &TTI) {
return TTI.areInlineCompatible(Caller, Callee) &&
- attributeMatches(Caller, Callee, Attribute::SanitizeAddress) &&
- attributeMatches(Caller, Callee, Attribute::SanitizeMemory) &&
- attributeMatches(Caller, Callee, Attribute::SanitizeThread);
+ AttributeFuncs::areInlineCompatible(*Caller, *Callee);
}
InlineCost InlineCostAnalysis::getInlineCost(CallSite CS, Function *Callee,
OpenPOWER on IntegriCloud