khchen added a comment. Herald added a reviewer: herhut. Herald added subscribers: frgossen, grosul1, Joonsoo.
Hi @lenary, I added a PoC patch D78035 <https://reviews.llvm.org/D78035> to complete ThinLTO based on this patch. There is also a missed hook in `ParallelCG.cpp` @@ -28,6 +28,7 @@ static void codegen(Module *M, llvm::raw_pwrite_stream &OS, function_ref<std::unique_ptr<TargetMachine>()> TMFactory, CodeGenFileType FileType) { std::unique_ptr<TargetMachine> TM = TMFactory(); + TM->initializeOptionsWithModuleMetadata(*M); legacy::PassManager CodeGenPasses; if (TM->addPassesToEmitFile(CodeGenPasses, OS, nullptr, FileType)) report_fatal_error("Failed to setup codegen"); I'm not sure passing Module in Target::createTargetMachine() is a good or not, because maybe the module flag will changed in next time on JIT compilation scenario? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72624/new/ https://reviews.llvm.org/D72624 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits