Revert r243347 "Add TargetTransformInfo::isZExtFree."
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 12 Nov 2015 20:51:52 +0000 (20:51 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 12 Nov 2015 20:51:52 +0000 (20:51 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252948 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 1ebbaa034757440e4a7f9d060b1f47746587774d..98458f1c3f3b0094623ad784f48f6169e42036bd 100644 (file)
@@ -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);
   }
index 8d5d2a71e426b9b67440703e154c4a15dcd0db91..415a85e990696cef36491862da8e348a96ff2d24 100644 (file)
@@ -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; }
index 3c01bcfbce576f6bd738c5cc2518c2be7f33a129..6eb4bb26c9b8da78d295553249a23b2b6d37d587 100644 (file)
@@ -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);
   }
index f82af757125b0e2d3bd58568f2369391e6c3f314..c2d5c88e641c65eba14651907d835c947ae81d2c 100644 (file)
@@ -144,10 +144,6 @@ bool TargetTransformInfo::isTruncateFree(Type *Ty1, Type *Ty2) const {
   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);
 }