Rename hasCompatibleFunctionAttributes->areInlineCompatible based

on suggestions. Currently the function is only used for inline purposes
and this is more descriptive for the use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher committed 2015-07-29 22:09:48 +00:00
1 parent f66eda96eb
commit b026a8ade1
6 files changed
+11 -11

No files matched your search

+4 -4
View File
@@ -527,7 +527,7 @@ public:
/// \returns True if the two functions have compatible attributes for inlining
/// purposes.
bool hasCompatibleFunctionAttributes(const Function *Caller,
bool areInlineCompatible(const Function *Caller,
const Function *Callee) const;
/// @}
@@ -631,7 +631,7 @@ public:
MemIntrinsicInfo &Info) = 0;
virtual Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
Type *ExpectedType) = 0;
virtual bool hasCompatibleFunctionAttributes(const Function *Caller,
virtual bool areInlineCompatible(const Function *Caller,
const Function *Callee) const = 0;
};
@@ -825,9 +825,9 @@ public:
Type *ExpectedType) override {
return Impl.getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
}
bool hasCompatibleFunctionAttributes(const Function *Caller,
bool areInlineCompatible(const Function *Caller,
const Function *Callee) const override {
return Impl.hasCompatibleFunctionAttributes(Caller, Callee);
return Impl.areInlineCompatible(Caller, Callee);
}
};
@@ -325,7 +325,7 @@ public:
return nullptr;
}
bool hasCompatibleFunctionAttributes(const Function *Caller,
bool areInlineCompatible(const Function *Caller,
const Function *Callee) const {
return (Caller->getFnAttribute("target-cpu") ==
Callee->getFnAttribute("target-cpu")) &&
+1 -1
View File
@@ -1346,7 +1346,7 @@ static bool attributeMatches(Function *F1, Function *F2, AttrKind Attr) {
static bool functionsHaveCompatibleAttributes(Function *Caller,
Function *Callee,
TargetTransformInfo &TTI) {
return TTI.hasCompatibleFunctionAttributes(Caller, Callee) &&
return TTI.areInlineCompatible(Caller, Callee) &&
attributeMatches(Caller, Callee, Attribute::SanitizeAddress) &&
attributeMatches(Caller, Callee, Attribute::SanitizeMemory) &&
attributeMatches(Caller, Callee, Attribute::SanitizeThread);
+3 -3
View File
@@ -288,9 +288,9 @@ Value *TargetTransformInfo::getOrCreateResultFromMemIntrinsic(
return TTIImpl->getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
}
bool TargetTransformInfo::hasCompatibleFunctionAttributes(
const Function *Caller, const Function *Callee) const {
return TTIImpl->hasCompatibleFunctionAttributes(Caller, Callee);
bool TargetTransformInfo::areInlineCompatible(const Function *Caller,
const Function *Callee) const {
return TTIImpl->areInlineCompatible(Caller, Callee);
}
TargetTransformInfo::Concept::~Concept() {}
+1 -1
View File
@@ -1135,7 +1135,7 @@ bool X86TTIImpl::isLegalMaskedStore(Type *DataType, int Consecutive) {
return isLegalMaskedLoad(DataType, Consecutive);
}
bool X86TTIImpl::hasCompatibleFunctionAttributes(const Function *Caller,
bool X86TTIImpl::areInlineCompatible(const Function *Caller,
const Function *Callee) const {
const TargetMachine &TM = getTLI()->getTargetMachine();
+1 -1
View File
@@ -92,7 +92,7 @@ public:
Type *Ty);
bool isLegalMaskedLoad(Type *DataType, int Consecutive);
bool isLegalMaskedStore(Type *DataType, int Consecutive);
bool hasCompatibleFunctionAttributes(const Function *Caller,
bool areInlineCompatible(const Function *Caller,
const Function *Callee) const;
/// @}