mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Use ValueMap instead of DenseMap.
The ValueMapper used by various cloning utility maps MDNodes also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user