diff options
author | Dan Gohman <gohman@apple.com> | 2009-06-18 16:54:06 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-06-18 16:54:06 +0000 |
commit | 4e8a98519ebf75ed47456ea42706aaa57ecd2c27 (patch) | |
tree | 9165002eee060048f64c69747335a732671e4078 /include | |
parent | fd3daa74c2e2df49150c710270c767a4564f04e1 (diff) | |
download | external_llvm-4e8a98519ebf75ed47456ea42706aaa57ecd2c27.zip external_llvm-4e8a98519ebf75ed47456ea42706aaa57ecd2c27.tar.gz external_llvm-4e8a98519ebf75ed47456ea42706aaa57ecd2c27.tar.bz2 |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/IVUsers.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/include/llvm/Analysis/IVUsers.h b/include/llvm/Analysis/IVUsers.h index 36ff07b..ac785d5 100644 --- a/include/llvm/Analysis/IVUsers.h +++ b/include/llvm/Analysis/IVUsers.h @@ -35,9 +35,9 @@ class IVStrideUse : public CallbackVH, public ilist_node<IVStrideUse> { 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<IVStrideUse> 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)); } }; |