================
@@ -4151,6 +4151,24 @@ Driver::getOffloadArchs(Compilation &C, const
llvm::opt::DerivedArgList &Args,
Args.ClaimAllArgs(options::OPT_offload_arch_EQ);
Args.ClaimAllArgs(options::OPT_no_offload_arch_EQ);
+ // For SYCL, compile once per IGCA target, e.g. once for igca_30r for both
+ // xe-mtl-u and xe-mtl-h, and record its Intel GPUs for ahead-of-time
+ // compilation.
+ if (Kind == Action::OFK_SYCL) {
+ llvm::DenseSet<StringRef> Targets;
+ for (StringRef Arch : Archs) {
+ OffloadArch ID = StringToOffloadArch(Arch);
+ if (!ID.isIntelGPU()) {
+ Targets.insert(Arch);
+ continue;
+ }
+ StringRef Target = OffloadArchToString(ID.intelGPUIGCATarget());
----------------
mdtoguchi wrote:
The `Target` here is the same as the `Name` resolution from Clang.cpp L9969
above. Maybe create a helper here to prevent drift.
https://github.com/llvm/llvm-project/pull/239010
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits