From 4e8a98519ebf75ed47456ea42706aaa57ecd2c27 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 18 Jun 2009 16:54:06 +0000 Subject: Remove the code from IVUsers that attempted to handle casted induction variables in cases where the cast isn't foldable. It ended up being a pessimization in many cases. This could be fixed, but it would require a bunch of complicated code in IVUsers' clients. The advantages of this approach aren't visible enough to justify it at this time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73706 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/IVUsers.h | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/llvm/Analysis/IVUsers.h b/include/llvm/Analysis/IVUsers.h index 36ff07b678..ac785d5c54 100644 --- a/include/llvm/Analysis/IVUsers.h +++ b/include/llvm/Analysis/IVUsers.h @@ -35,9 +35,9 @@ class IVStrideUse : public CallbackVH, public ilist_node { public: IVStrideUse(IVUsersOfOneStride *parent, const SCEVHandle &offset, - Instruction* U, Value *O, bool issigned) + Instruction* U, Value *O) : CallbackVH(U), Parent(parent), Offset(offset), - OperandValToReplace(O), IsSigned(issigned), + OperandValToReplace(O), IsUseOfPostIncrementedValue(false) { } @@ -57,8 +57,7 @@ public: /// getOffset - Return the offset to add to a theoeretical induction /// variable that starts at zero and counts up by the stride to compute - /// the value for the use. This always has the same type as the stride, - /// which may need to be casted to match the type of the use. + /// the value for the use. This always has the same type as the stride. SCEVHandle getOffset() const { return Offset; } /// setOffset - Assign a new offset to this use. @@ -78,13 +77,6 @@ public: OperandValToReplace = Op; } - /// isSigned - The stride (and thus also the Offset) of this use may be in - /// a narrower type than the use itself (OperandValToReplace->getType()). - /// When this is the case, isSigned() indicates whether the IV expression - /// should be signed-extended instead of zero-extended to fit the type of - /// the use. - bool isSigned() const { return IsSigned; } - /// isUseOfPostIncrementedValue - True if this should use the /// post-incremented version of this IV, not the preincremented version. /// This can only be set in special cases, such as the terminating setcc @@ -110,10 +102,6 @@ private: /// that this IVStrideUse is representing. WeakVH OperandValToReplace; - /// IsSigned - Determines whether the replacement value is sign or - /// zero extended to the type of the use. - bool IsSigned; - /// IsUseOfPostIncrementedValue - True if this should use the /// post-incremented version of this IV, not the preincremented version. bool IsUseOfPostIncrementedValue; @@ -170,9 +158,8 @@ public: /// initial value and the operand that uses the IV. ilist Users; - void addUser(const SCEVHandle &Offset,Instruction *User, Value *Operand, - bool isSigned) { - Users.push_back(new IVStrideUse(this, Offset, User, Operand, isSigned)); + void addUser(const SCEVHandle &Offset, Instruction *User, Value *Operand) { + Users.push_back(new IVStrideUse(this, Offset, User, Operand)); } }; -- cgit v1.2.3-70-g09d2