================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits