Lines Matching refs:VMap
35 ValueToValueMapTy &VMap,
50 VMap[II] = NewInst; // Add instruction map to value.
72 // VMap values.
75 ValueToValueMapTy &VMap,
84 assert(VMap.count(I) && "No mapping from source argument specified!");
91 //Some arguments were deleted with the VMap. Copy arguments one by one
94 if (Argument* Anew = dyn_cast<Argument>(VMap[I]))
115 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo);
116 VMap[&BB] = CBB; // Add basic block mapping.
123 // references as we go. This uses VMap to do all the hard work.
124 for (Function::iterator BB = cast<BasicBlock>(VMap[OldFunc->begin()]),
128 RemapInstruction(II, VMap,
134 /// in the VMap are changed to refer to their mapped value instead of the
135 /// original one. If any of the arguments to the function are in the VMap,
136 /// the arguments are deleted from the resultant function. The VMap is
140 Function *llvm::CloneFunction(const Function *F, ValueToValueMapTy &VMap,
146 // the VMap. If so, we need to not add the arguments to the arg ty vector
150 if (VMap.count(I) == 0) // Haven't mapped the argument to anything yet?
164 if (VMap.count(I) == 0) { // Is this argument preserved?
166 VMap[I] = DestI++; // Add mapping to VMap
170 CloneFunctionInto(NewF, F, VMap, ModuleLevelChanges, Returns, "", CodeInfo);
182 ValueToValueMapTy &VMap;
197 VMap(valueMap), ModuleLevelChanges(moduleLevelChanges),
208 /// mapping its operands through VMap if they are available.
217 TrackingVH<Value> &BBEntry = VMap[BB];
236 VMap[II] = C;
244 VMap[II] = NewInst; // Add instruction map to value.
264 Value *V = VMap[BI->getCondition()];
271 VMap[OldTI] = BranchInst::Create(Dest, NewBB);
280 Value *V = VMap[SI->getCondition()];
285 VMap[OldTI] = BranchInst::Create(Dest, NewBB);
296 VMap[OldTI] = NewInst; // Add instruction map to value.
317 /// mapping its operands through VMap if they are available.
323 VMap,
352 ValueToValueMapTy &VMap,
364 assert(VMap.count(II) && "No mapping from source argument specified!");
367 PruningFunctionCloner PFC(NewFunc, OldFunc, VMap, ModuleLevelChanges,
387 Value *V = VMap[BI];
395 // references as we go. This uses VMap to do all the hard work.
414 RemapInstruction(I, VMap,
424 BasicBlock *NewBB = cast<BasicBlock>(VMap[OldBB]);
431 PHINode *PN = cast<PHINode>(VMap[OPN]);
433 Value *V = VMap[PN->getIncomingBlock(pred)];
436 VMap,
491 assert(VMap[OldI] == PN && "VMap mismatch");
492 VMap[OldI] = NV;
498 // VMap. Single entry phi nodes can have multiple VMap entries
499 // pointing at them. Thus, deleting one would require scanning the VMap
508 Function::iterator I = cast<BasicBlock>(VMap[&OldFunc->getEntryBlock()]);
515 // require scanning the VMap to update any entries that point to the phi