/external/llvm/lib/Transforms/Utils/ |
D | CloneFunction.cpp | 40 ValueToValueMapTy &VMap, in CloneBasicBlock() argument 55 VMap[&*II] = NewInst; // Add instruction map to value. in CloneBasicBlock() 79 ValueToValueMapTy &VMap, in CloneFunctionInto() argument 89 assert(VMap.count(&I) && "No mapping from source argument specified!"); in CloneFunctionInto() 101 MapValue(OldFunc->getPersonalityFn(), VMap, in CloneFunctionInto() 108 if (Argument *NewArg = dyn_cast<Argument>(VMap[&OldArg])) { in CloneFunctionInto() 127 *MapMetadata(MD.second, VMap, in CloneFunctionInto() 140 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo); in CloneFunctionInto() 143 VMap[&BB] = CBB; in CloneFunctionInto() 154 VMap[OldBBAddr] = BlockAddress::get(NewFunc, CBB); in CloneFunctionInto() [all …]
|
D | CloneModule.cpp | 30 ValueToValueMapTy VMap; in CloneModule() local 31 return CloneModule(M, VMap); in CloneModule() 35 ValueToValueMapTy &VMap) { in CloneModule() argument 36 return CloneModule(M, VMap, [](const GlobalValue *GV) { return true; }); in CloneModule() 40 const Module *M, ValueToValueMapTy &VMap, in CloneModule() argument 63 VMap[&*I] = GV; in CloneModule() 71 VMap[&I] = NF; in CloneModule() 92 VMap[&*I] = GV; in CloneModule() 102 VMap[&*I] = GA; in CloneModule() 114 GlobalVariable *GV = cast<GlobalVariable>(VMap[&*I]); in CloneModule() [all …]
|
D | LoopUnrollRuntime.cpp | 64 BasicBlock *NewPreHeader, ValueToValueMapTy &VMap, in ConnectProlog() argument 68 BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]); in ConnectProlog() 97 V = VMap.lookup(I); in ConnectProlog() 154 ValueToValueMapTy &VMap, DominatorTree *DT, in ConnectEpilog() argument 158 BasicBlock *EpilogLatch = cast<BasicBlock>(VMap[Latch]); in ConnectEpilog() 202 V = VMap.lookup(I); in ConnectEpilog() 242 PHINode *VPN = cast<PHINode>(VMap[&BBI]); in ConnectEpilog() 274 LoopBlocksDFS &LoopBlocks, ValueToValueMapTy &VMap, in CloneLoopBlocks() argument 295 BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, "." + suffix, F); in CloneLoopBlocks() 303 VMap[*BB] = NewBB; in CloneLoopBlocks() [all …]
|
D | LoopUnroll.cpp | 56 ValueToValueMapTy &VMap) { in remapInstruction() argument 59 ValueToValueMapTy::iterator It = VMap.find(Op); in remapInstruction() 60 if (It != VMap.end()) in remapInstruction() 66 ValueToValueMapTy::iterator It = VMap.find(PN->getIncomingBlock(i)); in remapInstruction() 67 if (It != VMap.end()) in remapInstruction() 391 ValueToValueMapTy VMap; in UnrollLoop() local 392 BasicBlock *New = CloneBasicBlock(*BB, VMap, "." + Twine(It)); in UnrollLoop() 427 PHINode *NewPHI = cast<PHINode>(VMap[OrigPHI]); in UnrollLoop() 432 VMap[OrigPHI] = InVal; in UnrollLoop() 438 for (ValueToValueMapTy::iterator VI = VMap.begin(), VE = VMap.end(); in UnrollLoop()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/ |
D | CloneFunction.cpp | 40 BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap, in CloneBasicBlock() argument 61 VMap[&I] = NewInst; // Add instruction map to value. in CloneBasicBlock() 85 ValueToValueMapTy &VMap, in CloneFunctionInto() argument 95 assert(VMap.count(&I) && "No mapping from source argument specified!"); in CloneFunctionInto() 107 MapValue(OldFunc->getPersonalityFn(), VMap, in CloneFunctionInto() 116 if (Argument *NewArg = dyn_cast<Argument>(VMap[&OldArg])) { in CloneFunctionInto() 133 auto &MD = VMap.MD(); in CloneFunctionInto() 148 *MapMetadata(MD.second, VMap, in CloneFunctionInto() 169 BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo, in CloneFunctionInto() 173 VMap[&BB] = CBB; in CloneFunctionInto() [all …]
|
D | CloneModule.cpp | 38 ValueToValueMapTy VMap; in CloneModule() local 39 return CloneModule(M, VMap); in CloneModule() 43 ValueToValueMapTy &VMap) { in CloneModule() argument 44 return CloneModule(M, VMap, [](const GlobalValue *GV) { return true; }); in CloneModule() 48 const Module &M, ValueToValueMapTy &VMap, in CloneModule() argument 72 VMap[&*I] = GV; in CloneModule() 80 VMap[&I] = NF; in CloneModule() 101 VMap[&*I] = GV; in CloneModule() 111 VMap[&*I] = GA; in CloneModule() 123 GlobalVariable *GV = cast<GlobalVariable>(VMap[&*I]); in CloneModule() [all …]
|
D | LoopUnrollRuntime.cpp | 71 ValueToValueMapTy &VMap, DominatorTree *DT, in ConnectProlog() argument 75 BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]); in ConnectProlog() 100 V = VMap.lookup(I); in ConnectProlog() 169 ValueToValueMapTy &VMap, DominatorTree *DT, in ConnectEpilog() argument 173 BasicBlock *EpilogLatch = cast<BasicBlock>(VMap[Latch]); in ConnectEpilog() 213 V = VMap.lookup(I); in ConnectEpilog() 249 PHINode *VPN = cast<PHINode>(VMap[&PN]); in ConnectEpilog() 288 ValueToValueMapTy &VMap, DominatorTree *DT, LoopInfo *LI) { in CloneLoopBlocks() argument 304 BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, "." + suffix, F); in CloneLoopBlocks() 313 VMap[*BB] = NewBB; in CloneLoopBlocks() [all …]
|
D | LoopUnrollPeel.cpp | 398 LoopBlocksDFS &LoopBlocks, ValueToValueMapTy &VMap, in cloneLoopBlocks() argument 413 BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, ".peel", F); in cloneLoopBlocks() 419 VMap[*BB] = NewBB; in cloneLoopBlocks() 428 DT->addNewBlock(NewBB, cast<BasicBlock>(VMap[IDom->getBlock()])); in cloneLoopBlocks() 437 InsertTop->getTerminator()->setSuccessor(0, cast<BasicBlock>(VMap[Header])); in cloneLoopBlocks() 444 BasicBlock *NewLatch = cast<BasicBlock>(VMap[Latch]); in cloneLoopBlocks() 461 PHINode *NewPHI = cast<PHINode>(VMap[&*I]); in cloneLoopBlocks() 463 VMap[&*I] = NewPHI->getIncomingValueForBlock(PreHeader); in cloneLoopBlocks() 468 VMap[&*I] = LVMap[LatchInst]; in cloneLoopBlocks() 470 VMap[&*I] = LatchVal; in cloneLoopBlocks() [all …]
|
D | LoopUnroll.cpp | 66 void llvm::remapInstruction(Instruction *I, ValueToValueMapTy &VMap) { in remapInstruction() argument 83 ValueToValueMapTy::iterator It = VMap.find(Op); in remapInstruction() 84 if (It != VMap.end()) in remapInstruction() 90 ValueToValueMapTy::iterator It = VMap.find(PN->getIncomingBlock(i)); in remapInstruction() 91 if (It != VMap.end()) in remapInstruction() 608 ValueToValueMapTy VMap; in UnrollLoop() local 609 BasicBlock *New = CloneBasicBlock(*BB, VMap, "." + Twine(It)); in UnrollLoop() 623 PHINode *NewPHI = cast<PHINode>(VMap[OrigPHI]); in UnrollLoop() 628 VMap[OrigPHI] = InVal; in UnrollLoop() 634 for (ValueToValueMapTy::iterator VI = VMap.begin(), VE = VMap.end(); in UnrollLoop()
|
D | InlineFunction.cpp | 775 ValueToValueMapTy &VMap) { in PropagateParallelLoopAccessMetadata() argument 781 for (ValueToValueMapTy::iterator VMI = VMap.begin(), VMIE = VMap.end(); in PropagateParallelLoopAccessMetadata() 806 static void CloneAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap) { in CloneAliasScopeMetadata() argument 868 for (ValueToValueMapTy::iterator VMI = VMap.begin(), VMIE = VMap.end(); in CloneAliasScopeMetadata() 912 static void AddAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap, in AddAliasScopeMetadata() argument 965 for (ValueToValueMapTy::iterator VMI = VMap.begin(), VMIE = VMap.end(); in AddAliasScopeMetadata() 1175 ValueToValueMapTy &VMap, in UpdateCallGraphAfterInlining() argument 1198 ValueToValueMapTy::iterator VMI = VMap.find(OrigCall); in UpdateCallGraphAfterInlining() 1200 if (VMI == VMap.end() || VMI->second == nullptr) in UpdateCallGraphAfterInlining() 1406 const ValueToValueMapTy &VMap, in updateCallerBFI() argument [all …]
|
/external/llvm/lib/ExecutionEngine/Orc/ |
D | IndirectionUtils.cpp | 165 ValueToValueMapTy *VMap) { in cloneFunctionDecl() argument 172 if (VMap) { in cloneFunctionDecl() 173 (*VMap)[&F] = NewF; in cloneFunctionDecl() 177 (*VMap)[&*ArgI] = &*NewArgI; in cloneFunctionDecl() 183 void moveFunctionBody(Function &OrigF, ValueToValueMapTy &VMap, in moveFunctionBody() argument 188 NewF = cast<Function>(VMap[&OrigF]); in moveFunctionBody() 190 assert(VMap[&OrigF] == NewF && "Incorrect function mapping in VMap."); in moveFunctionBody() 197 CloneFunctionInto(NewF, &OrigF, VMap, /*ModuleLevelChanges=*/true, Returns, in moveFunctionBody() 203 ValueToValueMapTy *VMap) { in cloneGlobalVariableDecl() argument 210 if (VMap) in cloneGlobalVariableDecl() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/ExecutionEngine/Orc/ |
D | IndirectionUtils.cpp | 267 ValueToValueMapTy *VMap) { in cloneFunctionDecl() argument 273 if (VMap) { in cloneFunctionDecl() 274 (*VMap)[&F] = NewF; in cloneFunctionDecl() 278 (*VMap)[&*ArgI] = &*NewArgI; in cloneFunctionDecl() 284 void moveFunctionBody(Function &OrigF, ValueToValueMapTy &VMap, in moveFunctionBody() argument 289 NewF = cast<Function>(VMap[&OrigF]); in moveFunctionBody() 291 assert(VMap[&OrigF] == NewF && "Incorrect function mapping in VMap."); in moveFunctionBody() 298 CloneFunctionInto(NewF, &OrigF, VMap, /*ModuleLevelChanges=*/true, Returns, in moveFunctionBody() 304 ValueToValueMapTy *VMap) { in cloneGlobalVariableDecl() argument 310 if (VMap) in cloneGlobalVariableDecl() [all …]
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | Cloning.h | 54 std::unique_ptr<Module> CloneModule(const Module *M, ValueToValueMapTy &VMap); 61 CloneModule(const Module *M, ValueToValueMapTy &VMap, 113 BasicBlock *CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap, 129 Function *CloneFunction(Function *F, ValueToValueMapTy &VMap, 142 ValueToValueMapTy &VMap, bool ModuleLevelChanges, 151 ValueToValueMapTy &VMap, bool ModuleLevelChanges, 168 ValueToValueMapTy &VMap, bool ModuleLevelChanges, 225 Loop *OrigLoop, ValueToValueMapTy &VMap, 232 ValueToValueMapTy &VMap);
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Transforms/Utils/ |
D | Cloning.h | 53 std::unique_ptr<Module> CloneModule(const Module &M, ValueToValueMapTy &VMap); 60 CloneModule(const Module &M, ValueToValueMapTy &VMap, 112 BasicBlock *CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap, 129 Function *CloneFunction(Function *F, ValueToValueMapTy &VMap, 142 ValueToValueMapTy &VMap, bool ModuleLevelChanges, 151 ValueToValueMapTy &VMap, bool ModuleLevelChanges, 168 ValueToValueMapTy &VMap, bool ModuleLevelChanges, 250 Loop *OrigLoop, ValueToValueMapTy &VMap, 257 ValueToValueMapTy &VMap);
|
/external/swiftshader/third_party/llvm-7.0/llvm/tools/bugpoint/ |
D | Miscompilation.cpp | 267 ValueToValueMapTy VMap; in TestFuncs() local 268 std::unique_ptr<Module> Clone = CloneModule(BD.getProgram(), VMap); in TestFuncs() 273 Function *F = cast<Function>(VMap[Funcs[i]]); in TestFuncs() 278 VMap.clear(); in TestFuncs() 279 std::unique_ptr<Module> ToNotOptimize = CloneModule(BD.getProgram(), VMap); in TestFuncs() 281 SplitFunctionsOutOfModule(ToNotOptimize.get(), FuncsOnClone, VMap); in TestFuncs() 316 ValueToValueMapTy VMap; in ExtractLoops() local 317 std::unique_ptr<Module> ToNotOptimize = CloneModule(BD.getProgram(), VMap); in ExtractLoops() 319 ToNotOptimize.get(), MiscompiledFunctions, VMap); in ExtractLoops() 346 MiscompiledFunctions[i] = cast<Function>(VMap[MiscompiledFunctions[i]]); in ExtractLoops() [all …]
|
D | CrashDebugger.cpp | 148 ValueToValueMapTy VMap; in TestGlobalVariables() local 149 std::unique_ptr<Module> M = CloneModule(BD.getProgram(), VMap); in TestGlobalVariables() 155 GlobalVariable *CMGV = cast<GlobalVariable>(VMap[GVs[i]]); in TestGlobalVariables() 242 ValueToValueMapTy VMap; in TestFuncs() local 243 std::unique_ptr<Module> M = CloneModule(BD.getProgram(), VMap); in TestFuncs() 248 Function *CMF = cast<Function>(VMap[Funcs[i]]); in TestFuncs() 385 ValueToValueMapTy VMap; in TestBlocks() local 386 std::unique_ptr<Module> M = CloneModule(BD.getProgram(), VMap); in TestBlocks() 391 Blocks.insert(cast<BasicBlock>(VMap[BBs[i]])); in TestBlocks() 504 ValueToValueMapTy VMap; in TestBlocks() local [all …]
|
/external/llvm/tools/bugpoint/ |
D | Miscompilation.cpp | 257 ValueToValueMapTy VMap; in TestFuncs() local 258 Module *Clone = CloneModule(BD.getProgram(), VMap).release(); in TestFuncs() 263 Function *F = cast<Function>(VMap[Funcs[i]]); in TestFuncs() 268 VMap.clear(); in TestFuncs() 269 std::unique_ptr<Module> ToNotOptimize = CloneModule(BD.getProgram(), VMap); in TestFuncs() 271 SplitFunctionsOutOfModule(ToNotOptimize.get(), FuncsOnClone, VMap); in TestFuncs() 306 ValueToValueMapTy VMap; in ExtractLoops() local 307 std::unique_ptr<Module> ToNotOptimize = CloneModule(BD.getProgram(), VMap); in ExtractLoops() 309 MiscompiledFunctions, VMap) in ExtractLoops() 338 MiscompiledFunctions[i] = cast<Function>(VMap[MiscompiledFunctions[i]]); in ExtractLoops() [all …]
|
D | CrashDebugger.cpp | 145 ValueToValueMapTy VMap; in TestGlobalVariables() local 146 Module *M = CloneModule(BD.getProgram(), VMap).release(); in TestGlobalVariables() 152 GlobalVariable* CMGV = cast<GlobalVariable>(VMap[GVs[i]]); in TestGlobalVariables() 242 ValueToValueMapTy VMap; in TestFuncs() local 243 Module *M = CloneModule(BD.getProgram(), VMap).release(); in TestFuncs() 248 Function *CMF = cast<Function>(VMap[Funcs[i]]); in TestFuncs() 349 ValueToValueMapTy VMap; in TestBlocks() local 350 Module *M = CloneModule(BD.getProgram(), VMap).release(); in TestBlocks() 355 Blocks.insert(cast<BasicBlock>(VMap[BBs[i]])); in TestBlocks() 459 ValueToValueMapTy VMap; in TestInsts() local [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Coroutines/ |
D | CoroSplit.cpp | 174 ValueToValueMapTy &VMap) { in replaceFallthroughCoroEnd() argument 175 auto *NewE = cast<IntrinsicInst>(VMap[End]); in replaceFallthroughCoroEnd() 186 static void replaceUnwindCoroEnds(coro::Shape &Shape, ValueToValueMapTy &VMap) { in replaceUnwindCoroEnds() argument 196 auto *NewCE = cast<IntrinsicInst>(VMap[CE]); in replaceUnwindCoroEnds() 258 ValueToValueMapTy VMap; in createClone() local 263 VMap[&A] = UndefValue::get(A.getType()); in createClone() 267 CloneFunctionInto(NewF, &F, VMap, /*ModuleLevelChanges=*/true, Returns); in createClone() 280 auto *SwitchBB = cast<BasicBlock>(VMap[ResumeEntry]); in createClone() 281 auto *Entry = cast<BasicBlock>(VMap[Shape.AllocaSpillBlock]); in createClone() 288 auto *Switch = cast<SwitchInst>(VMap[Shape.ResumeSwitch]); in createClone() [all …]
|
/external/llvm/include/llvm/ExecutionEngine/Orc/ |
D | CompileOnDemandLayer.h | 300 ValueToValueMapTy VMap; in addLogicalModule() local 304 if (!GV.isDeclaration() && !VMap.count(&GV)) in addLogicalModule() 305 cloneGlobalVariableDecl(*GVsM, GV, &VMap); in addLogicalModule() 309 if (!VMap.count(&A)) in addLogicalModule() 310 cloneGlobalAliasDecl(*GVsM, A, VMap); in addLogicalModule() 347 moveGlobalVariableInitializer(GV, VMap, &Materializer); in addLogicalModule() 351 auto *NewA = cast<GlobalAlias>(VMap[&A]); in addLogicalModule() 353 Value *Init = MapValue(A.getAliasee(), VMap, RF_None, nullptr, in addLogicalModule() 439 ValueToValueMapTy VMap; in emitPartition() local 442 &VMap](Value *V) -> Value * { in emitPartition() [all …]
|
/external/llvm/lib/Transforms/IPO/ |
D | PartialInlining.cpp | 81 ValueToValueMapTy VMap; in unswitchFunction() local 82 Function* duplicateFunction = CloneFunction(F, VMap); in unswitchFunction() 84 BasicBlock* newEntryBlock = cast<BasicBlock>(VMap[entryBlock]); in unswitchFunction() 85 BasicBlock* newReturnBlock = cast<BasicBlock>(VMap[returnBlock]); in unswitchFunction() 86 BasicBlock* newNonReturnBlock = cast<BasicBlock>(VMap[nonReturnBlock]); in unswitchFunction()
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/ExecutionEngine/Orc/ |
D | CompileOnDemandLayer.h | 426 ValueToValueMapTy VMap; in addLogicalModule() local 430 if (!GV.isDeclaration() && !VMap.count(&GV)) in addLogicalModule() 431 cloneGlobalVariableDecl(*GVsM, GV, &VMap); in addLogicalModule() 435 if (!VMap.count(&A)) in addLogicalModule() 436 cloneGlobalAliasDecl(*GVsM, A, VMap); in addLogicalModule() 439 cloneModuleFlagsMetadata(*GVsM, SrcM, VMap); in addLogicalModule() 477 moveGlobalVariableInitializer(GV, VMap, &Materializer); in addLogicalModule() 481 auto *NewA = cast<GlobalAlias>(VMap[&A]); in addLogicalModule() 483 Value *Init = MapValue(A.getAliasee(), VMap, RF_None, nullptr, in addLogicalModule() 616 ValueToValueMapTy VMap; in emitPartition() local [all …]
|
D | IndirectionUtils.h | 348 ValueToValueMapTy *VMap = nullptr); 358 void moveFunctionBody(Function &OrigF, ValueToValueMapTy &VMap, 364 ValueToValueMapTy *VMap = nullptr); 375 ValueToValueMapTy &VMap, 381 ValueToValueMapTy &VMap); 385 ValueToValueMapTy &VMap);
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | SimpleLoopUnswitch.cpp | 875 ValueToValueMapTy &VMap, in buildClonedLoopBlocks() argument 885 BasicBlock *NewBB = CloneBasicBlock(OldBB, VMap, ".us", OldBB->getParent()); in buildClonedLoopBlocks() 890 VMap[OldBB] = NewBB; in buildClonedLoopBlocks() 951 assert(VMap.lookup(&I) == &ClonedI && "Mismatch in the value map!"); in buildClonedLoopBlocks() 969 RemapInstruction(&I, VMap, in buildClonedLoopBlocks() 981 if (auto *ClonedSuccBB = cast_or_null<BasicBlock>(VMap.lookup(SuccBB))) in buildClonedLoopBlocks() 987 auto *ClonedParentBB = cast<BasicBlock>(VMap.lookup(ParentBB)); in buildClonedLoopBlocks() 992 auto *ClonedSuccBB = cast_or_null<BasicBlock>(VMap.lookup(SuccBB)); in buildClonedLoopBlocks() 1002 auto *ClonedSuccBB = cast<BasicBlock>(VMap.lookup(UnswitchedSuccBB)); in buildClonedLoopBlocks() 1043 const ValueToValueMapTy &VMap, LoopInfo &LI) { in cloneLoopNest() argument [all …]
|
/external/llvm/unittests/Transforms/Utils/ |
D | Cloning.cpp | 171 ValueToValueMapTy VMap; in TEST_F() local 172 VMap[A] = UndefValue::get(A->getType()); in TEST_F() 174 CloneFunctionInto(F2, F1, VMap, false, Returns); in TEST_F() 194 ValueToValueMapTy VMap; in TEST_F() local 195 VMap[&*F1->arg_begin()] = &*F2->arg_begin(); in TEST_F() 197 CloneFunctionInto(F2, F1, VMap, false, Returns); in TEST_F() 276 ValueToValueMapTy VMap; in CreateNewFunc() local 277 NewFunc = CloneFunction(OldFunc, VMap, nullptr); in CreateNewFunc()
|