Remove unused SCEV functions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 21 Oct 2013 18:08:09 +0000 (18:08 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 21 Oct 2013 18:08:09 +0000 (18:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193097 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp

index 59c8b8a71947b40aeec55eff1208b93a9e9918eb..3d3765152536bb96905beb393da705ae49089a98 100644 (file)
@@ -641,20 +641,11 @@ namespace llvm {
     ///
     const SCEV *getSizeOfExpr(Type *IntTy, Type *AllocTy);
 
-    /// getAlignOfExpr - Return an expression for alignof AllocTy
-    ///
-    const SCEV *getAlignOfExpr(Type *AllocTy);
-
     /// getOffsetOfExpr - Return an expression for offsetof on the given field
     /// with type IntTy
     ///
     const SCEV *getOffsetOfExpr(Type *IntTy, StructType *STy, unsigned FieldNo);
 
-    /// getOffsetOfExpr - Return an expression for offsetof on the given field
-    /// that is type IntTy
-    ///
-    const SCEV *getOffsetOfExpr(Type *IntTy, Type *CTy, Constant *FieldNo);
-
     /// getNegativeSCEV - Return the SCEV object corresponding to -V.
     ///
     const SCEV *getNegativeSCEV(const SCEV *V);
index 5047c6698565d8c073ec694b2efa19406248f1f2..83f1e7264f2c260ff16ff6c353510585be8f52a6 100644 (file)
@@ -2606,15 +2606,6 @@ const SCEV *ScalarEvolution::getSizeOfExpr(Type *IntTy, Type *AllocTy) {
   return getTruncateOrZeroExtend(getSCEV(C), Ty);
 }
 
-const SCEV *ScalarEvolution::getAlignOfExpr(Type *AllocTy) {
-  Constant *C = ConstantExpr::getAlignOf(AllocTy);
-  if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
-    if (Constant *Folded = ConstantFoldConstantExpression(CE, TD, TLI))
-      C = Folded;
-  Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(AllocTy));
-  return getTruncateOrZeroExtend(getSCEV(C), Ty);
-}
-
 const SCEV *ScalarEvolution::getOffsetOfExpr(Type *IntTy,
                                              StructType *STy,
                                              unsigned FieldNo) {
@@ -2630,18 +2621,8 @@ const SCEV *ScalarEvolution::getOffsetOfExpr(Type *IntTy,
   if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
     if (Constant *Folded = ConstantFoldConstantExpression(CE, TD, TLI))
       C = Folded;
-  Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(STy));
-  return getTruncateOrZeroExtend(getSCEV(C), Ty);
-}
 
-const SCEV *ScalarEvolution::getOffsetOfExpr(Type *IntTy,
-                                             Type *CTy,
-                                             Constant *FieldNo) {
-  Constant *C = ConstantExpr::getOffsetOf(CTy, FieldNo);
-  if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
-    if (Constant *Folded = ConstantFoldConstantExpression(CE, TD, TLI))
-      C = Folded;
-  Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(CTy));
+  Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(STy));
   return getTruncateOrZeroExtend(getSCEV(C), Ty);
 }