/// \returns True if the two functions have compatible attributes for inlining
/// purposes.
- bool hasCompatibleFunctionAttributes(const Function *Caller,
- const Function *Callee) const;
+ bool areInlineCompatible(const Function *Caller,
+ const Function *Callee) const;
/// @}
MemIntrinsicInfo &Info) = 0;
virtual Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
Type *ExpectedType) = 0;
- virtual bool hasCompatibleFunctionAttributes(const Function *Caller,
- const Function *Callee) const = 0;
+ virtual bool areInlineCompatible(const Function *Caller,
+ const Function *Callee) const = 0;
};
template <typename T>
Type *ExpectedType) override {
return Impl.getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
}
- bool hasCompatibleFunctionAttributes(const Function *Caller,
- const Function *Callee) const override {
- return Impl.hasCompatibleFunctionAttributes(Caller, Callee);
+ bool areInlineCompatible(const Function *Caller,
+ const Function *Callee) const override {
+ return Impl.areInlineCompatible(Caller, Callee);
}
};
return nullptr;
}
- bool hasCompatibleFunctionAttributes(const Function *Caller,
- const Function *Callee) const {
+ bool areInlineCompatible(const Function *Caller,
+ const Function *Callee) const {
return (Caller->getFnAttribute("target-cpu") ==
Callee->getFnAttribute("target-cpu")) &&
(Caller->getFnAttribute("target-features") ==
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);
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() {}
return isLegalMaskedLoad(DataType, Consecutive);
}
-bool X86TTIImpl::hasCompatibleFunctionAttributes(const Function *Caller,
- const Function *Callee) const {
+bool X86TTIImpl::areInlineCompatible(const Function *Caller,
+ const Function *Callee) const {
const TargetMachine &TM = getTLI()->getTargetMachine();
// Work this as a subsetting of subtarget features.
Type *Ty);
bool isLegalMaskedLoad(Type *DataType, int Consecutive);
bool isLegalMaskedStore(Type *DataType, int Consecutive);
- bool hasCompatibleFunctionAttributes(const Function *Caller,
- const Function *Callee) const;
+ bool areInlineCompatible(const Function *Caller,
+ const Function *Callee) const;
/// @}
};