Lines Matching refs:VMap
39 ValueToValueMapTy &VMap, in CloneBasicBlock() argument
54 VMap[II] = NewInst; // Add instruction map to value. in CloneBasicBlock()
78 ValueToValueMapTy &VMap, in CloneFunctionInto() argument
89 assert(VMap.count(I) && "No mapping from source argument specified!"); in CloneFunctionInto()
101 if (Argument *NewArg = dyn_cast<Argument>(VMap[&OldArg])) { in CloneFunctionInto()
124 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo); in CloneFunctionInto()
127 VMap[&BB] = CBB; in CloneFunctionInto()
138 VMap[OldBBAddr] = BlockAddress::get(NewFunc, CBB); in CloneFunctionInto()
148 for (Function::iterator BB = cast<BasicBlock>(VMap[OldFunc->begin()]), in CloneFunctionInto()
152 RemapInstruction(II, VMap, in CloneFunctionInto()
180 ValueToValueMapTy &VMap) { in CloneDebugInfoMetadata() argument
189 VMap[OldFunc] = NewFunc; in CloneDebugInfoMetadata()
191 cast<MDSubprogram>(MapMetadata(OldSubprogramMDNode, VMap)); in CloneDebugInfoMetadata()
214 Function *llvm::CloneFunction(const Function *F, ValueToValueMapTy &VMap, in CloneFunction() argument
224 if (VMap.count(I) == 0) // Haven't mapped the argument to anything yet? in CloneFunction()
238 if (VMap.count(I) == 0) { // Is this argument preserved? in CloneFunction()
240 VMap[I] = DestI++; // Add mapping to VMap in CloneFunction()
244 CloneDebugInfoMetadata(NewF, F, VMap); in CloneFunction()
247 CloneFunctionInto(NewF, F, VMap, ModuleLevelChanges, Returns, "", CodeInfo); in CloneFunction()
258 ValueToValueMapTy &VMap; member
271 : NewFunc(newFunc), OldFunc(oldFunc), VMap(valueMap), in PruningFunctionCloner()
297 WeakVH &BBEntry = VMap[BB]; in CloneBlock()
319 VMap[OldBBAddr] = BlockAddress::get(NewFunc, NewBB); in CloneBlock()
331 = Director->handleInstruction(VMap, II, NewBB); in CloneBlock()
351 RemapInstruction(NewInst, VMap, in CloneBlock()
362 if (Value *MappedV = VMap.lookup(V)) in CloneBlock()
365 VMap[II] = V; in CloneBlock()
373 VMap[II] = NewInst; // Add instruction map to value. in CloneBlock()
389 = Director->handleInstruction(VMap, OldTI, NewBB); in CloneBlock()
413 Value *V = VMap[BI->getCondition()]; in CloneBlock()
420 VMap[OldTI] = BranchInst::Create(Dest, NewBB); in CloneBlock()
429 Value *V = VMap[SI->getCondition()]; in CloneBlock()
435 VMap[OldTI] = BranchInst::Create(Dest, NewBB); in CloneBlock()
446 VMap[OldTI] = NewInst; // Add instruction map to value. in CloneBlock()
467 ValueToValueMapTy &VMap, in CloneAndPruneIntoFromInst() argument
489 assert(VMap.count(II) && "No mapping from source argument specified!"); in CloneAndPruneIntoFromInst()
492 PruningFunctionCloner PFC(NewFunc, OldFunc, VMap, ModuleLevelChanges, in CloneAndPruneIntoFromInst()
519 Value *V = VMap[BI]; in CloneAndPruneIntoFromInst()
532 if (isa<PHINode>(VMap[PN])) in CloneAndPruneIntoFromInst()
543 RemapInstruction(NewBB->getTerminator(), VMap, in CloneAndPruneIntoFromInst()
554 BasicBlock *NewBB = cast<BasicBlock>(VMap[OldBB]); in CloneAndPruneIntoFromInst()
561 PHINode *PN = cast<PHINode>(VMap[OPN]); in CloneAndPruneIntoFromInst()
563 Value *V = VMap[PN->getIncomingBlock(pred)]; in CloneAndPruneIntoFromInst()
566 VMap, in CloneAndPruneIntoFromInst()
621 assert(VMap[OldI] == PN && "VMap mismatch"); in CloneAndPruneIntoFromInst()
622 VMap[OldI] = NV; in CloneAndPruneIntoFromInst()
637 if (PHINode *PN = dyn_cast<PHINode>(VMap[PHIToResolve[Idx]])) in CloneAndPruneIntoFromInst()
644 Function::iterator Begin = cast<BasicBlock>(VMap[StartingBB]); in CloneAndPruneIntoFromInst()
695 for (Function::iterator I = cast<BasicBlock>(VMap[StartingBB]), in CloneAndPruneIntoFromInst()
711 ValueToValueMapTy &VMap, in CloneAndPruneFunctionInto() argument
717 CloneAndPruneIntoFromInst(NewFunc, OldFunc, OldFunc->front().begin(), VMap, in CloneAndPruneFunctionInto()