Rename hasCompatibleFunctionAttributes->areInlineCompatible based
authorEric Christopher <echristo@gmail.com>
Wed, 29 Jul 2015 22:09:48 +0000 (22:09 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 29 Jul 2015 22:09:48 +0000 (22:09 +0000)
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

include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
lib/Analysis/IPA/InlineCost.cpp
lib/Analysis/TargetTransformInfo.cpp
lib/Target/X86/X86TargetTransformInfo.cpp
lib/Target/X86/X86TargetTransformInfo.h

index a85174a108106437be3ce9b829617c154b7d29ed..fd3cfe72921db57a70ec15b2e2e22964bddda261 100644 (file)
@@ -527,8 +527,8 @@ public:
 
   /// \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;
 
   /// @}
 
@@ -631,8 +631,8 @@ public:
                                   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>
@@ -825,9 +825,9 @@ public:
                                            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);
   }
 };
 
index 2abe0a58b840749162895b81f219fe6916f23f77..9805f6bc663a15abbc7f1a25acffb3e15b14da84 100644 (file)
@@ -325,8 +325,8 @@ public:
     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") ==
index c0d2e375cb04f7d57a7a49d6b2c7fb596a00b471..6d53b48832d927cd2298aa5a6b0cb78e06d5e278 100644 (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);
index b426b2f121ca20321627e6d39f01eb7b97204d19..731aae23a26bd6148c749be66a2ebd7e2eb0770d 100644 (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() {}
index 04c16f8dfc777ee30da024b62092a308db76c31d..673aefd046fe7090fc274b07d30b9198f48c7129 100644 (file)
@@ -1135,8 +1135,8 @@ bool X86TTIImpl::isLegalMaskedStore(Type *DataType, int Consecutive) {
   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.
index da3f36c2e27eaa286d5db276e1b8cc54e7f2ec5f..23efcade51d0c3ec3ba4ac499881554c0723831c 100644 (file)
@@ -92,8 +92,8 @@ public:
                          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;
 
   /// @}
 };