mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Rename hasCompatibleFunctionAttributes->areInlineCompatible based
on suggestions. Currently the function is only used for inline purposes and this is more descriptive for the use. llvm-svn: 243578
This commit is contained in:
parent
23b46a70dd
commit
520f118385
@ -527,7 +527,7 @@ public:
|
|||||||
|
|
||||||
/// \returns True if the two functions have compatible attributes for inlining
|
/// \returns True if the two functions have compatible attributes for inlining
|
||||||
/// purposes.
|
/// purposes.
|
||||||
bool hasCompatibleFunctionAttributes(const Function *Caller,
|
bool areInlineCompatible(const Function *Caller,
|
||||||
const Function *Callee) const;
|
const Function *Callee) const;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
@ -631,7 +631,7 @@ public:
|
|||||||
MemIntrinsicInfo &Info) = 0;
|
MemIntrinsicInfo &Info) = 0;
|
||||||
virtual Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
|
virtual Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst,
|
||||||
Type *ExpectedType) = 0;
|
Type *ExpectedType) = 0;
|
||||||
virtual bool hasCompatibleFunctionAttributes(const Function *Caller,
|
virtual bool areInlineCompatible(const Function *Caller,
|
||||||
const Function *Callee) const = 0;
|
const Function *Callee) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -825,9 +825,9 @@ public:
|
|||||||
Type *ExpectedType) override {
|
Type *ExpectedType) override {
|
||||||
return Impl.getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
|
return Impl.getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
|
||||||
}
|
}
|
||||||
bool hasCompatibleFunctionAttributes(const Function *Caller,
|
bool areInlineCompatible(const Function *Caller,
|
||||||
const Function *Callee) const override {
|
const Function *Callee) const override {
|
||||||
return Impl.hasCompatibleFunctionAttributes(Caller, Callee);
|
return Impl.areInlineCompatible(Caller, Callee);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ public:
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasCompatibleFunctionAttributes(const Function *Caller,
|
bool areInlineCompatible(const Function *Caller,
|
||||||
const Function *Callee) const {
|
const Function *Callee) const {
|
||||||
return (Caller->getFnAttribute("target-cpu") ==
|
return (Caller->getFnAttribute("target-cpu") ==
|
||||||
Callee->getFnAttribute("target-cpu")) &&
|
Callee->getFnAttribute("target-cpu")) &&
|
||||||
|
@ -1346,7 +1346,7 @@ static bool attributeMatches(Function *F1, Function *F2, AttrKind Attr) {
|
|||||||
static bool functionsHaveCompatibleAttributes(Function *Caller,
|
static bool functionsHaveCompatibleAttributes(Function *Caller,
|
||||||
Function *Callee,
|
Function *Callee,
|
||||||
TargetTransformInfo &TTI) {
|
TargetTransformInfo &TTI) {
|
||||||
return TTI.hasCompatibleFunctionAttributes(Caller, Callee) &&
|
return TTI.areInlineCompatible(Caller, Callee) &&
|
||||||
attributeMatches(Caller, Callee, Attribute::SanitizeAddress) &&
|
attributeMatches(Caller, Callee, Attribute::SanitizeAddress) &&
|
||||||
attributeMatches(Caller, Callee, Attribute::SanitizeMemory) &&
|
attributeMatches(Caller, Callee, Attribute::SanitizeMemory) &&
|
||||||
attributeMatches(Caller, Callee, Attribute::SanitizeThread);
|
attributeMatches(Caller, Callee, Attribute::SanitizeThread);
|
||||||
|
@ -288,9 +288,9 @@ Value *TargetTransformInfo::getOrCreateResultFromMemIntrinsic(
|
|||||||
return TTIImpl->getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
|
return TTIImpl->getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TargetTransformInfo::hasCompatibleFunctionAttributes(
|
bool TargetTransformInfo::areInlineCompatible(const Function *Caller,
|
||||||
const Function *Caller, const Function *Callee) const {
|
const Function *Callee) const {
|
||||||
return TTIImpl->hasCompatibleFunctionAttributes(Caller, Callee);
|
return TTIImpl->areInlineCompatible(Caller, Callee);
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetTransformInfo::Concept::~Concept() {}
|
TargetTransformInfo::Concept::~Concept() {}
|
||||||
|
@ -1135,7 +1135,7 @@ bool X86TTIImpl::isLegalMaskedStore(Type *DataType, int Consecutive) {
|
|||||||
return isLegalMaskedLoad(DataType, Consecutive);
|
return isLegalMaskedLoad(DataType, Consecutive);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86TTIImpl::hasCompatibleFunctionAttributes(const Function *Caller,
|
bool X86TTIImpl::areInlineCompatible(const Function *Caller,
|
||||||
const Function *Callee) const {
|
const Function *Callee) const {
|
||||||
const TargetMachine &TM = getTLI()->getTargetMachine();
|
const TargetMachine &TM = getTLI()->getTargetMachine();
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
Type *Ty);
|
Type *Ty);
|
||||||
bool isLegalMaskedLoad(Type *DataType, int Consecutive);
|
bool isLegalMaskedLoad(Type *DataType, int Consecutive);
|
||||||
bool isLegalMaskedStore(Type *DataType, int Consecutive);
|
bool isLegalMaskedStore(Type *DataType, int Consecutive);
|
||||||
bool hasCompatibleFunctionAttributes(const Function *Caller,
|
bool areInlineCompatible(const Function *Caller,
|
||||||
const Function *Callee) const;
|
const Function *Callee) const;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
Loading…
Reference in New Issue
Block a user