[llvm] r193097 - Remove unused SCEV functions

Matt Arsenault Matthew.Arsenault at amd.com
Mon Oct 21 11:08:09 PDT 2013


Author: arsenm
Date: Mon Oct 21 13:08:09 2013
New Revision: 193097

URL: http://llvm.org/viewvc/llvm-project?rev=193097&view=rev
Log:
Remove unused SCEV functions

Modified:
    llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
    llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=193097&r1=193096&r2=193097&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Mon Oct 21 13:08:09 2013
@@ -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);

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=193097&r1=193096&r2=193097&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Oct 21 13:08:09 2013
@@ -2606,15 +2606,6 @@ const SCEV *ScalarEvolution::getSizeOfEx
   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::getOffsetOf
   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);
 }
 





More information about the llvm-commits mailing list