================
@@ -924,6 +925,54 @@ static bool canSkipModuleSplit(IRSplitMode Mode, const
Module &M,
});
}
+/// AOT-compiles every already-produced image in \p SplitModules concurrently
+/// and swaps each module's path to point at the compiled object.
+static Error aotCompileSplitModules(SmallVectorImpl<SplitModule> &SplitModules,
+ const ArgList &Args, StringRef OutputFile)
{
+ // Each worker thread writes only its own index, so this is race-free.
+ SmallVector<std::string, 0> AOTFiles(SplitModules.size());
----------------
wenju-he wrote:
This follows existing style at
https://github.com/llvm/llvm-project/blob/e80cb508f0ab3b916873b8a4939203cd5d36901a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp#L863
So it matches with SplitModules's declaration: use heap memory instead of a
fixed count.
https://github.com/llvm/llvm-project/pull/224548
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits