diff options
author | Dan Gohman <gohman@apple.com> | 2009-06-29 18:25:52 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-06-29 18:25:52 +0000 |
commit | e00beaaee8d1e63e0f086bf9ff91e099a7e40a08 (patch) | |
tree | bfeca9c2e1b07ee4bfb089a10c28ddee7f973ad6 /llvm/lib/Analysis | |
parent | 45c299ef65e4895219909de19c2b8f4bd02feb70 (diff) | |
download | bcm5719-llvm-e00beaaee8d1e63e0f086bf9ff91e099a7e40a08.tar.gz bcm5719-llvm-e00beaaee8d1e63e0f086bf9ff91e099a7e40a08.zip |
Simplify this code, and avoid using APInt(). This fixes
(otherwise harmless) uninitialized value warnings that
Duncan found with gcc-4.4.
llvm-svn: 74437
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index f4210e7b02e..6e32dcd51fb 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1048,9 +1048,8 @@ CollectAddOperandsWithScales(DenseMap<const SCEV*, APInt> &M, SmallVector<const SCEV*, 4> MulOps(Mul->op_begin()+1, Mul->op_end()); const SCEV* Key = SE.getMulExpr(MulOps); std::pair<DenseMap<const SCEV*, APInt>::iterator, bool> Pair = - M.insert(std::make_pair(Key, APInt())); + M.insert(std::make_pair(Key, NewScale)); if (Pair.second) { - Pair.first->second = NewScale; NewOps.push_back(Pair.first->first); } else { Pair.first->second += NewScale; @@ -1067,9 +1066,8 @@ CollectAddOperandsWithScales(DenseMap<const SCEV*, APInt> &M, } else { // An ordinary operand. Update the map. std::pair<DenseMap<const SCEV*, APInt>::iterator, bool> Pair = - M.insert(std::make_pair(Ops[i], APInt())); + M.insert(std::make_pair(Ops[i], Scale)); if (Pair.second) { - Pair.first->second = Scale; NewOps.push_back(Pair.first->first); } else { Pair.first->second += Scale; |