diff options
author | Devang Patel <dpatel@apple.com> | 2010-06-24 00:33:28 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-06-24 00:33:28 +0000 |
commit | 0dc3c2d37ee1f91e6c5fb3d91604c6147c2d7916 (patch) | |
tree | 7d0cc5f607976ec763d26c8d6b63c8c859a29975 /llvm/lib/Transforms/Utils/LoopUnroll.cpp | |
parent | 191a1cd2bb06a62daa761a3bfa972068b8c2c378 (diff) | |
download | bcm5719-llvm-0dc3c2d37ee1f91e6c5fb3d91604c6147c2d7916.tar.gz bcm5719-llvm-0dc3c2d37ee1f91e6c5fb3d91604c6147c2d7916.zip |
Use ValueMap instead of DenseMap.
The ValueMapper used by various cloning utility maps MDNodes also.
llvm-svn: 106706
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnroll.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnroll.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp index e704e32aba9..e0e07e7bbc8 100644 --- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp @@ -39,10 +39,10 @@ STATISTIC(NumUnrolled, "Number of loops unrolled (completely or otherwise)"); /// RemapInstruction - Convert the instruction operands from referencing the /// current values into those specified by VMap. static inline void RemapInstruction(Instruction *I, - DenseMap<const Value *, Value*> &VMap) { + ValueMap<const Value *, Value*> &VMap) { for (unsigned op = 0, E = I->getNumOperands(); op != E; ++op) { Value *Op = I->getOperand(op); - DenseMap<const Value *, Value*>::iterator It = VMap.find(Op); + ValueMap<const Value *, Value*>::iterator It = VMap.find(Op); if (It != VMap.end()) I->setOperand(op, It->second); } @@ -183,7 +183,7 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, LoopInfo* LI, LPPassManager* LPM) // For the first iteration of the loop, we should use the precloned values for // PHI nodes. Insert associations now. - typedef DenseMap<const Value*, Value*> ValueToValueMapTy; + typedef ValueMap<const Value*, Value*> ValueToValueMapTy; ValueToValueMapTy LastValueMap; std::vector<PHINode*> OrigPHINode; for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { |