/llvm-project/llvm/lib/LTO/ |
H A D | ThinLTOCodeGenerator.cpp | 94 static void saveTempBitcode(const Module &TheModule, StringRef TempDir, 105 WriteBitcodeToFile(TheModule, OS, /* ShouldPreserveUseListOrder */ true); in saveTempBitcode() 161 static void promoteModule(Module &TheModule, const ModuleSummaryIndex &Index, in generateModuleMap() 163 renameModuleForThinLTO(TheModule, Index, ClearDSOLocalOnDeclarations); in promoteModule() argument 178 static void verifyLoadedModule(Module &TheModule) { 180 if (verifyModule(TheModule, &dbgs(), &BrokenDebugInfo)) 183 TheModule.getContext().diagnose(ThinLTODiagnosticInfo( in verifyLoadedModule() 185 StripDebugInfo(TheModule); in verifyLoadedModule() 213 crossImportIntoModule(Module &TheModule, const ModuleSummaryIndex &Index, in loadModuleFromInput() 219 return loadModuleFromInput(Input, TheModule in crossImportIntoModule() 96 saveTempBitcode(const Module & TheModule,StringRef TempDir,unsigned count,StringRef Suffix) saveTempBitcode() argument 181 verifyLoadedModule(Module & TheModule) verifyLoadedModule() argument 216 crossImportIntoModule(Module & TheModule,const ModuleSummaryIndex & Index,StringMap<lto::InputFile * > & ModuleMap,const FunctionImporter::ImportMapTy & ImportList,bool ClearDSOLocalOnDeclarations) crossImportIntoModule() argument 240 optimizeModule(Module & TheModule,TargetMachine & TM,unsigned OptLevel,bool Freestanding,bool DebugPassManager,ModuleSummaryIndex * Index) optimizeModule() argument 329 codegenModule(Module & TheModule,TargetMachine & TM) codegenModule() argument 433 ProcessThinLTOModule(Module & TheModule,ModuleSummaryIndex & Index,StringMap<lto::InputFile * > & ModuleMap,TargetMachine & TM,const FunctionImporter::ImportMapTy & ImportList,const FunctionImporter::ExportSetTy & ExportList,const DenseSet<GlobalValue::GUID> & GUIDPreservedSymbols,const GVSummaryMapTy & DefinedGlobals,const ThinLTOCodeGenerator::CachingOptions & CacheOptions,bool DisableCodeGen,StringRef SaveTempsDir,bool Freestanding,unsigned OptLevel,unsigned count,bool DebugPassManager) ProcessThinLTOModule() argument 676 promote(Module & TheModule,ModuleSummaryIndex & Index,const lto::InputFile & File) promote() argument 728 crossModuleImport(Module & TheModule,ModuleSummaryIndex & Index,const lto::InputFile & File) crossModuleImport() argument 768 gatherImportedSummariesForModule(Module & TheModule,ModuleSummaryIndex & Index,std::map<std::string,GVSummaryMapTy> & ModuleToSummariesForIndex,const lto::InputFile & File) gatherImportedSummariesForModule() argument 806 emitImports(Module & TheModule,StringRef OutputName,ModuleSummaryIndex & Index,const lto::InputFile & File) emitImports() argument 852 internalize(Module & TheModule,ModuleSummaryIndex & Index,const lto::InputFile & File) internalize() argument 915 optimize(Module & TheModule) optimize() argument 992 auto TheModule = loadModuleFromInput(Mod.get(), Context, false, run() local 1177 auto TheModule = loadModuleFromInput(Mod.get(), Context, false, run() local [all...] |
H A D | UpdateCompilerUsed.cpp | 34 void findInModule(Module &TheModule) { in findInModule() argument 35 initializeLibCalls(TheModule); in findInModule() 36 for (Function &F : TheModule) in findInModule() 38 for (GlobalVariable &GV : TheModule.globals()) in findInModule() 40 for (GlobalAlias &GA : TheModule.aliases()) in findInModule() 59 void initializeLibCalls(const Module &TheModule) { in initializeLibCalls() argument 74 for (const Function &F : TheModule) { in initializeLibCalls() 123 void llvm::updateCompilerUsed(Module &TheModule, const TargetMachine &TM, in updateCompilerUsed() argument 127 .findInModule(TheModule); in updateCompilerUsed() 132 appendToCompilerUsed(TheModule, UsedValues); in updateCompilerUsed()
|
/llvm-project/clang/unittests/Interpreter/ |
H A D | IncrementalProcessingTest.cpp | 72 ASSERT_TRUE(PTUs[0]->TheModule); in TEST_F() 73 ASSERT_TRUE(PTUs[0]->TheModule->getFunction("funcForProg1")); in TEST_F() 76 ASSERT_TRUE(PTUs[1]->TheModule); in TEST_F() 77 ASSERT_TRUE(PTUs[1]->TheModule->getFunction("funcForProg2")); in TEST_F() 79 ASSERT_FALSE(PTUs[1]->TheModule->getFunction("funcForProg1")); in TEST_F() 82 const Function *GlobalInit1 = getGlobalInit(PTUs[0]->TheModule.get()); in TEST_F() 85 const Function *GlobalInit2 = getGlobalInit(PTUs[1]->TheModule.get()); in TEST_F()
|
/llvm-project/llvm/lib/Target/X86/ |
H A D | X86WinEHState.cpp | 87 Module *TheModule = nullptr; 128 TheModule = &M; in doFinalization() 133 assert(TheModule == &M); in doFinalization() 134 TheModule = nullptr; in doFinalization() 180 Type *Int8PtrType = PointerType::getUnqual(TheModule->getContext()); in runOnFunction() 181 SetJmp3 = TheModule->getOrInsertFunction( in runOnFunction() 183 Type::getInt32Ty(TheModule->getContext()), in runOnFunction() 184 {Int8PtrType, Type::getInt32Ty(TheModule->getContext())}, in runOnFunction() 219 LLVMContext &Context = TheModule->getContext(); in getEHLinkRegistrationType() 237 LLVMContext &Context = TheModule in getCXXEHRegistrationType() 84 Module *TheModule = nullptr; global() member in __anon69712a700111::WinEHStatePass [all...] |
/llvm-project/clang/lib/Interpreter/ |
H A D | Wasm.cpp | 69 PTU.TheModule->getTargetTriple(), ErrorString); in addModule() 77 PTU.TheModule->getTargetTriple(), "", "", TO, llvm::Reloc::Model::PIC_); in addModule() 78 PTU.TheModule->setDataLayout(TargetMachine->createDataLayout()); in addModule() 79 std::string ObjectFileName = PTU.TheModule->getName().str() + ".o"; in addModule() 80 std::string BinaryFileName = PTU.TheModule->getName().str() + ".wasm"; in addModule() 92 if (!PM.run(*PTU.TheModule)) { in addModule()
|
H A D | DeviceOffload.cpp | 80 PTU.TheModule->getTargetTriple(), Error); in GeneratePTX() 86 PTU.TheModule->getTargetTriple(), TargetOpts.CPU, "", TO, in GeneratePTX() 88 PTU.TheModule->setDataLayout(TargetMachine->createDataLayout()); in GeneratePTX() 101 if (!PM.run(*PTU.TheModule)) in GeneratePTX()
|
/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | NameAnonGlobals.cpp | 26 Module &TheModule; member in __anon22bbea920111::ModuleHasher 30 ModuleHasher(Module &M) : TheModule(M) {} in ModuleHasher() 39 for (auto &F : TheModule) { in get() 45 for (auto &GV : TheModule.globals()) { in get()
|
/llvm-project/llvm/tools/llvm-jitlistener/ |
H A D | llvm-jitlistener.cpp | 152 std::unique_ptr<Module> TheModule(parseIRFile(IRFile, Err, Context)); in InitEE() local 153 if (!TheModule) { in InitEE() 165 Triple Tuple(TheModule->getTargetTriple()); in InitEE() 171 TheModule->setTargetTriple(Tuple.getTriple()); in InitEE() 176 TheJIT.reset(EngineBuilder(std::move(TheModule)) in InitEE()
|
/llvm-project/clang/lib/CodeGen/ |
H A D | CGObjCGNU.cpp | 96 llvm::Module &TheModule; 212 auto *ConstStr = TheModule.getGlobalVariable(name); in ExportUniqueString() 215 auto *GV = new llvm::GlobalVariable(TheModule, value->getType(), true, in ExportUniqueString() 217 GV->setComdat(TheModule.getOrInsertComdat(name)); in ExportUniqueString() 280 const llvm::DataLayout &DL = TheModule.getDataLayout(); in PushPropertyListHeader() 1031 llvm::Constant *isa = TheModule.getNamedGlobal(Sym); in GenerateConstantString() 1034 isa = new llvm::GlobalVariable(TheModule, IdTy, /* isConstant */false, in GenerateConstantString() 1086 auto *Buffer = new llvm::GlobalVariable(TheModule, C->getType(), in GenerateConstantString() 1125 ObjCStrGV->setComdat(TheModule.getOrInsertComdat(StringName)); in GenerateConstantString() 1194 const llvm::DataLayout &DL = TheModule in GenerateProtocolMethodList() 97 llvm::Module &TheModule; global() member in __anon62da92030111::CGObjCGNU [all...] |
H A D | CodeGenAction.cpp | 872 TheModule.reset(); in DiagnosticHandlerImpl() 915 TheModule = BEConsumer->takeModule(); in ~CodeGenAction() 919 return std::move(TheModule); in loadLinkModules() 1121 TheModule = loadModule(*MainFile); in loadModule() 1122 if (!TheModule) in loadModule() 1126 if (TheModule->getTargetTriple() != TargetOpts.Triple) { in loadModule() 1129 TheModule->setTargetTriple(TargetOpts.Triple); in loadModule() 1132 EmbedObject(TheModule.get(), CodeGenOpts, Diagnostics); in loadModule() 1133 EmbedBitcode(TheModule.get(), CodeGenOpts, *MainFile); in loadModule() 1135 LLVMContext &Ctx = TheModule in loadModule() [all...] |
H A D | BackendUtil.cpp | 142 llvm::Module *TheModule; 214 TheModule(M), VFS(std::move(VFS)), in EmitAssemblyHelper() 215 TargetTriple(TheModule->getTargetTriple()) {} in EmitAssemblyHelper() 586 std::string Triple = TheModule->getTargetTriple(); in AddEmitPasses() 906 TheModule->getContext(), in RunOptimizationPipeline() 1113 if (!TheModule->getModuleFlag("EnableSplitLTOUnit")) in RunOptimizationPipeline() 1114 TheModule->addModuleFlag(llvm::Module::Error, "EnableSplitLTOUnit", in RunOptimizationPipeline() 1133 if (!TheModule->getModuleFlag("ThinLTO") && !CodeGenOpts.UnifiedLTO) in RunCodegenPipeline() 1134 TheModule->addModuleFlag(llvm::Module::Error, "ThinLTO", uint32_t(0)); in RunCodegenPipeline() 1135 if (!TheModule in RunCodegenPipeline() 140 llvm::Module *TheModule; global() member in __anon684942f70111::EmitAssemblyHelper [all...] |
H A D | CodeGenTypes.h | 58 llvm::Module &TheModule; variable 100 return TheModule.getDataLayout(); 106 llvm::LLVMContext &getLLVMContext() { return TheModule.getContext(); } in getDataLayout()
|
/llvm-project/llvm/lib/Transforms/ObjCARC/ |
H A D | ARCRuntimeEntryPoints.h | 57 TheModule = M; in init() 71 assert(TheModule != nullptr && "Not initialized."); in get() 106 Module *TheModule = nullptr; 142 return Decl = Intrinsic::getOrInsertDeclaration(TheModule, IntID); in getIntrinsicEntryPoint()
|
/llvm-project/llvm/tools/llvm-lto/ |
H A D | llvm-lto.cpp | 653 static void writeModuleToFile(Module &TheModule, StringRef Filename) { in thinLink() 657 maybeVerifyModule(TheModule); in thinLink() 658 WriteBitcodeToFile(TheModule, OS, /* ShouldPreserveUseListOrder */ true); in thinLink() 751 auto TheModule = loadModuleFromInput(*Input, Ctx); in promote() 758 *TheModule, *Index, ModuleToSummariesForIndex, DecSummaries, *Input); in promote() 789 auto TheModule = loadModuleFromInput(*Input, Ctx); in import() 796 ThinGenerator.emitImports(*TheModule, OutputName, *Index, *Input); in import() 816 auto TheModule = loadModuleFromInput(*Input, Ctx); in internalize() 818 ThinGenerator.promote(*TheModule, *Index, *Input); in internalize() 824 writeModuleToFile(*TheModule, OutputNam in internalize() 592 writeModuleToFile(Module & TheModule,StringRef Filename) writeModuleToFile() argument 690 auto TheModule = loadModuleFromInput(*Input, Ctx); distributedIndexes() local 727 auto TheModule = loadModuleFromInput(*Input, Ctx); emitImports() local 754 auto TheModule = loadModuleFromInput(*Input, Ctx); promote() local 787 auto TheModule = loadModuleFromInput(*Input, Ctx); import() local 820 auto TheModule = loadModuleFromInput(*Input, Ctx); internalize() local 845 auto TheModule = loadModuleFromInput(*Input, Ctx); optimize() local [all...] |
/llvm-project/llvm/include/llvm/Transforms/IPO/ |
H A D | Internalize.h | 70 bool internalizeModule(Module &TheModule); 77 internalizeModule(Module &TheModule, in internalizeModule() argument 80 .internalizeModule(TheModule); in internalizeModule()
|
H A D | FunctionImport.h | 427 /// and consider visibility from other definitions for ELF) in \p TheModule 428 /// 2. (optional) Apply propagated function attributes to \p TheModule if 430 void thinLTOFinalizeInModule(Module &TheModule, 434 /// Internalize \p TheModule based on the information recorded in the summaries 436 void thinLTOInternalizeModule(Module &TheModule,
|
/llvm-project/llvm/unittests/IR/ |
H A D | ConstantsTest.cpp | 430 bool foldFuncPtrAndConstToNull(LLVMContext &Context, Module *TheModule, 436 Function::Create(FuncType, GlobalValue::ExternalLinkage, "", TheModule)); in foldFuncPtrAndConstToNull() 450 if (!TheModule) { in foldFuncPtrAndConstToNull() 460 Module TheModule("TestModule", Context); in TEST() 466 ASSERT_TRUE(foldFuncPtrAndConstToNull(Context, &TheModule, 2)); in TEST() 471 Module TheModule("TestModule", Context); in TEST() 472 ASSERT_FALSE(foldFuncPtrAndConstToNull(Context, &TheModule, 4)); in TEST() local 477 Module TheModule("TestModule", Context); in TEST() 482 TheModule.setDataLayout(AlignmentString); in TEST() 483 ASSERT_TRUE(foldFuncPtrAndConstToNull(Context, &TheModule, AndValu in TEST() 431 foldFuncPtrAndConstToNull(LLVMContext & Context,Module * TheModule,uint64_t AndValue,MaybeAlign FunctionAlign=std::nullopt) foldFuncPtrAndConstToNull() argument 461 Module TheModule("TestModule", Context); TEST() local 478 Module TheModule("TestModule", Context); TEST() local 491 Module TheModule("TestModule", Context); TEST() local 502 Module TheModule("TestModule", Context); TEST() local 509 Module TheModule("TestModule", Context); TEST() local [all...] |
/llvm-project/llvm/examples/Kaleidoscope/MCJIT/cached/ |
H A D | toy-jit.cpp | 624 static Module *TheModule; variable 660 Function *F = TheModule->getFunction(std::string("unary")+Opcode); in Codegen() 708 Function *F = TheModule->getFunction(std::string("binary")+Op); in Codegen() 717 Function *CalleeF = TheModule->getFunction(Callee); in Codegen() 937 Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule); in Codegen() 943 F = TheModule->getFunction(Name); in Codegen() 1152 TheModule = parseInputIR(InputIR); in main() 1154 TheModule = new Module("my cool jit", Context); in main() 1159 TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); in main() 1165 FunctionPassManager OurFPM(TheModule); in main() [all …]
|
/llvm-project/llvm/examples/Kaleidoscope/Chapter3/ |
H A D | toy.cpp | 403 static std::unique_ptr<Module> TheModule; variable 448 Function *CalleeF = TheModule->getFunction(Callee); in codegen() 473 Function::Create(FT, Function::ExternalLinkage, Name, TheModule.get()); in codegen() 485 Function *TheFunction = TheModule->getFunction(Proto->getName()); in codegen() 524 TheModule = std::make_unique<Module>("my cool jit", *TheContext); in InitializeModule() 619 TheModule->print(errs(), nullptr); in main()
|
/llvm-project/llvm/examples/Kaleidoscope/MCJIT/lazy/ |
H A D | toy-jit.cpp | 609 static Module *TheModule; variable 645 Function *F = TheModule->getFunction(std::string("unary")+Opcode); in Codegen() 690 Function *F = TheModule->getFunction(std::string("binary")+Op); in Codegen() 699 Function *CalleeF = TheModule->getFunction(Callee); in Codegen() 919 Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule); in Codegen() 925 F = TheModule->getFunction(Name); in Codegen() 1117 TheModule = new Module("my cool jit", Context); in main() 1121 TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&ErrStr).create(); in main() 1127 FunctionPassManager OurFPM(TheModule); in main() 1162 TheModule->print(errs(), nullptr); in main()
|
/llvm-project/llvm/examples/Kaleidoscope/Chapter4/ |
H A D | toy.cpp | 417 static std::unique_ptr<Module> TheModule; variable 438 if (auto *F = TheModule->getFunction(Name)) in getFunction() 512 Function::Create(FT, Function::ExternalLinkage, Name, TheModule.get()); in codegen() 565 TheModule = std::make_unique<Module>("KaleidoscopeJIT", *TheContext); in InitializeModuleAndManagers() 566 TheModule->setDataLayout(TheJIT->getDataLayout()); in InitializeModuleAndManagers() 606 ThreadSafeModule(std::move(TheModule), std::move(TheContext)))); in HandleDefinition() 637 auto TSM = ThreadSafeModule(std::move(TheModule), std::move(TheContext)); in HandleTopLevelExpression()
|
/llvm-project/llvm/lib/CodeGen/ |
H A D | MachineModuleInfo.cpp | 48 TheModule = MMI.TheModule; 197 MMI.TheModule = &M; in getLocCookie() 221 MMI.TheModule = &M; in doInitialization()
|
/llvm-project/llvm/examples/Kaleidoscope/Chapter5/ |
H A D | toy.cpp | 544 static std::unique_ptr<Module> TheModule; variable 565 if (auto *F = TheModule->getFunction(Name)) in getFunction() 786 Function::Create(FT, Function::ExternalLinkage, Name, TheModule.get()); in codegen() 839 TheModule = std::make_unique<Module>("KaleidoscopeJIT", *TheContext); in InitializeModuleAndManagers() 840 TheModule->setDataLayout(TheJIT->getDataLayout()); in InitializeModuleAndManagers() 880 ThreadSafeModule(std::move(TheModule), std::move(TheContext)))); in HandleDefinition() 911 auto TSM = ThreadSafeModule(std::move(TheModule), std::move(TheContext)); in HandleTopLevelExpression()
|
/llvm-project/llvm/examples/Kaleidoscope/Chapter6/ |
H A D | toy.cpp | 636 static std::unique_ptr<Module> TheModule; variable 657 if (auto *F = TheModule->getFunction(Name)) in getFunction() 898 Function::Create(FT, Function::ExternalLinkage, Name, TheModule.get()); in codegen() 958 TheModule = std::make_unique<Module>("KaleidoscopeJIT", *TheContext); in InitializeModuleAndManagers() 959 TheModule->setDataLayout(TheJIT->getDataLayout()); in InitializeModuleAndManagers() 999 ThreadSafeModule(std::move(TheModule), std::move(TheContext)))); in HandleDefinition() 1030 auto TSM = ThreadSafeModule(std::move(TheModule), std::move(TheContext)); in HandleTopLevelExpression()
|
/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | MachineModuleInfo.h | 95 const Module *TheModule = nullptr; 132 const Module *getModule() const { return TheModule; } 87 const Module *TheModule = nullptr; global() variable
|