summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2015-12-22 23:57:37 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2015-12-22 23:57:37 +0000
commit1cb242eb139d31e2d76b8a2affef97eb9b33ad1b (patch)
tree54d906a8c921a5769f8e1471454c174969c3067b /llvm/lib/Analysis/InlineCost.cpp
parent6a2c71af0bc5beebf954e1970233fbeb3be0bf1c (diff)
downloadbcm5719-llvm-1cb242eb139d31e2d76b8a2affef97eb9b33ad1b.tar.gz
bcm5719-llvm-1cb242eb139d31e2d76b8a2affef97eb9b33ad1b.zip
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 llvm-svn: 256304
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-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