Home | History | Annotate | Download | only in Utils

Lines Matching refs:VMap

39                                   ValueToValueMapTy &VMap,
54 VMap[II] = NewInst; // Add instruction map to value.
75 // VMap values.
78 ValueToValueMapTy &VMap,
89 assert(VMap.count(I) && "No mapping from source argument specified!");
99 // Clone any argument attributes that are present in the VMap.
101 if (Argument *NewArg = dyn_cast<Argument>(VMap[&OldArg])) {
124 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo);
127 VMap[&BB] = CBB;
138 VMap[OldBBAddr] = BlockAddress::get(NewFunc, CBB);
147 // references as we go. This uses VMap to do all the hard work.
148 for (Function::iterator BB = cast<BasicBlock>(VMap[OldFunc->begin()]),
152 RemapInstruction(II, VMap,
180 ValueToValueMapTy &VMap) {
189 VMap[OldFunc] = NewFunc;
190 DISubprogram NewSubprogram(MapValue(OldSubprogramMDNode, VMap));
207 /// in the VMap are changed to refer to their mapped value instead of the
208 /// original one. If any of the arguments to the function are in the VMap,
209 /// the arguments are deleted from the resultant function. The VMap is
213 Function *llvm::CloneFunction(const Function *F, ValueToValueMapTy &VMap,
219 // the VMap. If so, we need to not add the arguments to the arg ty vector
223 if (VMap.count(I) == 0) // Haven't mapped the argument to anything yet?
237 if (VMap.count(I) == 0) { // Is this argument preserved?
239 VMap[I] = DestI++; // Add mapping to VMap
243 CloneDebugInfoMetadata(NewF, F, VMap);
246 CloneFunctionInto(NewF, F, VMap, ModuleLevelChanges, Returns, "", CodeInfo);
258 ValueToValueMapTy &VMap;
271 VMap(valueMap), ModuleLevelChanges(moduleLevelChanges),
286 WeakVH &BBEntry = VMap[BB];
308 VMap[OldBBAddr] = BlockAddress::get(NewFunc, NewBB);
323 RemapInstruction(NewInst, VMap,
332 if (Value *MappedV = VMap.lookup(V))
335 VMap[II] = V;
343 VMap[II] = NewInst; // Add instruction map to value.
363 Value *V = VMap[BI->getCondition()];
370 VMap[OldTI] = BranchInst::Create(Dest, NewBB);
379 Value *V = VMap[SI->getCondition()];
385 VMap[OldTI] = BranchInst::Create(Dest, NewBB);
396 VMap[OldTI] = NewInst; // Add instruction map to value.
420 ValueToValueMapTy &VMap,
432 assert(VMap.count(II) && "No mapping from source argument specified!");
435 PruningFunctionCloner PFC(NewFunc, OldFunc, VMap, ModuleLevelChanges,
455 Value *V = VMap[BI];
472 RemapInstruction(NewBB->getTerminator(), VMap,
482 BasicBlock *NewBB = cast<BasicBlock>(VMap[OldBB]);
489 PHINode *PN = cast<PHINode>(VMap[OPN]);
491 Value *V = VMap[PN->getIncomingBlock(pred)];
494 VMap,
549 assert(VMap[OldI] == PN && "VMap mismatch");
550 VMap[OldI] = NV;
560 // WeakVH in the VMap. Notably, we rely on that so that if we coalesce
565 if (PHINode *PN = dyn_cast<PHINode>(VMap[PHIToResolve[Idx]]))
572 Function::iterator Begin = cast<BasicBlock>(VMap[&OldFunc->getEntryBlock()]);
623 for (Function::iterator I = cast<BasicBlock>(VMap[&OldFunc->getEntryBlock()]),