[clang] [llvm] [Clang][SYCL] Define Intel IGCA preprocessor macro definitions for SYCL during device compilation (PR #227877)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 8 12:32:08 PST 2026
================
@@ -313,6 +314,12 @@ class LLVM_LIBRARY_VISIBILITY BaseSPIRVTargetInfo : public BaseSPIRTargetInfo {
return Feature == "spirv";
}
+ // The LLVM SPIR-V backend defines no processors and accepts only "generic";
+ // The -target-cpu value used in BaseSPIRTargetInfo is only used by the
+ // frontend, and the backend / createTargetMachine should not use this
+ // -target-cpu value to (attempt to) construct an LLVM TargetMachine.
+ StringRef getBackendCPU() const override { return StringRef(); }
----------------
tahonermann wrote:
I'm not fond of introducing this indirection; especially if it is only needed for SPIR-V. It seems likely that we'll eventually want the SPIR-V backend to be aware of the IGCA target, so we might as well pass that through now. The backend can be updated to ignore it in the meantime (if it matches an IGCA target).
https://github.com/llvm/llvm-project/pull/227877
More information about the cfe-commits
mailing list