[llvm] r252948 - Revert r243347 "Add TargetTransformInfo::isZExtFree."

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 12:51:53 PST 2015


Author: sanjoy
Date: Thu Nov 12 14:51:52 2015
New Revision: 252948

URL: http://llvm.org/viewvc/llvm-project?rev=252948&view=rev
Log:
Revert r243347 "Add TargetTransformInfo::isZExtFree."

r243347 was intended to support a change to LSR (r243348).  That change
to LSR has since had to be reverted (r243939) because it was buggy, and
now the code added in r243347 is untested and unexercised.  Given that,
I think it is appropriate to revert r243347 for now, with the intent of
adding it back in later if I get around to checking in a fixed version
of r243348.

Modified:
    llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
    llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h
    llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h
    llvm/trunk/lib/Analysis/TargetTransformInfo.cpp

Modified: llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h?rev=252948&r1=252947&r2=252948&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h Thu Nov 12 14:51:52 2015
@@ -337,11 +337,6 @@ public:
   /// by referencing its sub-register AX.
   bool isTruncateFree(Type *Ty1, Type *Ty2) const;
 
-  /// \brief Return true if it's free to zero extend a value of type Ty1 to type
-  /// Ty2. e.g. on x86-64, all instructions that define 32-bit values implicit
-  /// zero-extend the result out to 64 bits.
-  bool isZExtFree(Type *Ty1, Type *Ty2) const;
-
   /// \brief Return true if it is profitable to hoist instruction in the
   /// then/else to before if.
   bool isProfitableToHoist(Instruction *I) const;
@@ -581,7 +576,6 @@ public:
                                    int64_t BaseOffset, bool HasBaseReg,
                                    int64_t Scale, unsigned AddrSpace) = 0;
   virtual bool isTruncateFree(Type *Ty1, Type *Ty2) = 0;
-  virtual bool isZExtFree(Type *Ty1, Type *Ty2) = 0;
   virtual bool isProfitableToHoist(Instruction *I) = 0;
   virtual bool isTypeLegal(Type *Ty) = 0;
   virtual unsigned getJumpBufAlignment() = 0;
@@ -721,9 +715,6 @@ public:
   bool isTruncateFree(Type *Ty1, Type *Ty2) override {
     return Impl.isTruncateFree(Ty1, Ty2);
   }
-  bool isZExtFree(Type *Ty1, Type *Ty2) override {
-    return Impl.isZExtFree(Ty1, Ty2);
-  }
   bool isProfitableToHoist(Instruction *I) override {
     return Impl.isProfitableToHoist(I);
   }

Modified: llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h?rev=252948&r1=252947&r2=252948&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetTransformInfoImpl.h Thu Nov 12 14:51:52 2015
@@ -228,8 +228,6 @@ public:
 
   bool isTruncateFree(Type *Ty1, Type *Ty2) { return false; }
 
-  bool isZExtFree(Type *Ty1, Type *Ty2) { return false; }
-
   bool isProfitableToHoist(Instruction *I) { return true; }
 
   bool isTypeLegal(Type *Ty) { return false; }

Modified: llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h?rev=252948&r1=252947&r2=252948&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h (original)
+++ llvm/trunk/include/llvm/CodeGen/BasicTTIImpl.h Thu Nov 12 14:51:52 2015
@@ -143,10 +143,6 @@ public:
     return getTLI()->isTruncateFree(Ty1, Ty2);
   }
 
-  bool isZExtFree(Type *Ty1, Type *Ty2) const {
-    return getTLI()->isZExtFree(Ty1, Ty2);
-  }
-
   bool isProfitableToHoist(Instruction *I) {
     return getTLI()->isProfitableToHoist(I);
   }

Modified: llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=252948&r1=252947&r2=252948&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/TargetTransformInfo.cpp Thu Nov 12 14:51:52 2015
@@ -144,10 +144,6 @@ bool TargetTransformInfo::isTruncateFree
   return TTIImpl->isTruncateFree(Ty1, Ty2);
 }
 
-bool TargetTransformInfo::isZExtFree(Type *Ty1, Type *Ty2) const {
-  return TTIImpl->isZExtFree(Ty1, Ty2);
-}
-
 bool TargetTransformInfo::isProfitableToHoist(Instruction *I) const {
   return TTIImpl->isProfitableToHoist(I);
 }




More information about the llvm-commits mailing list