summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-14 17:08:09 +0000
committerDan Gohman <gohman@apple.com>2009-12-14 17:08:09 +0000
commit6dc1ef392348b61f228612f24087f47d4e4e2982 (patch)
tree4b6dd99f3d7234ceb33e468384450eac3d6283ca /lib/Transforms/Scalar/LoopStrengthReduce.cpp
parent440b40d86521305d631e6461314540f54659d4a2 (diff)
downloadllvm-6dc1ef392348b61f228612f24087f47d4e4e2982.tar.gz
llvm-6dc1ef392348b61f228612f24087f47d4e4e2982.tar.bz2
llvm-6dc1ef392348b61f228612f24087f47d4e4e2982.tar.xz
Delete an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index dcbc9c2074..12bb87a77d 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -90,10 +90,6 @@ namespace {
/// particular stride.
std::map<const SCEV *, IVsOfOneStride> IVsByStride;
- /// StrideNoReuse - Keep track of all the strides whose ivs cannot be
- /// reused (nor should they be rewritten to reuse other strides).
- SmallSet<const SCEV *, 4> StrideNoReuse;
-
/// DeadInsts - Keep track of instructions we may have made dead, so that
/// we can remove them after we are done working.
SmallVector<WeakVH, 16> DeadInsts;
@@ -983,17 +979,13 @@ const SCEV *LoopStrengthReduce::CheckForIVReuse(bool HasBaseReg,
const SCEV *const &Stride,
IVExpr &IV, const Type *Ty,
const std::vector<BasedUser>& UsersToProcess) {
- if (StrideNoReuse.count(Stride))
- return SE->getIntegerSCEV(0, Stride->getType());
-
if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Stride)) {
int64_t SInt = SC->getValue()->getSExtValue();
for (unsigned NewStride = 0, e = IU->StrideOrder.size();
NewStride != e; ++NewStride) {
std::map<const SCEV *, IVsOfOneStride>::iterator SI =
IVsByStride.find(IU->StrideOrder[NewStride]);
- if (SI == IVsByStride.end() || !isa<SCEVConstant>(SI->first) ||
- StrideNoReuse.count(SI->first))
+ if (SI == IVsByStride.end() || !isa<SCEVConstant>(SI->first))
continue;
// The other stride has no uses, don't reuse it.
std::map<const SCEV *, IVUsersOfOneStride *>::iterator UI =
@@ -2766,7 +2758,6 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
// We're done analyzing this loop; release all the state we built up for it.
IVsByStride.clear();
- StrideNoReuse.clear();
// Clean up after ourselves
if (!DeadInsts.empty())