================
@@ -3616,6 +3617,12 @@ unsigned FunctionDecl::getBuiltinID(bool
ConsiderWrapperFunctions) const {
if (!ConsiderWrapperFunctions && getStorageClass() == SC_Static)
return 0;
+ // AMDGCN implementation supports printf as a builtin
+ // for OpenCL
+ if (Context.getTargetInfo().getTriple().isAMDGCN() &&
+ Context.getLangOpts().OpenCL && BuiltinID == AMDGPU::BIprintf)
+ return BuiltinID;
----------------
arsenm wrote:
I think CustomTypeChecking is the backdoor for builtin types to change based on
code. Not sure if there's a nicer mechanism. If it doesn't exist already, we
could maybe come up with a way to swap out a type based on the language mode.
It looks like the move to define builtins in TableGen is incomplete ,as the
target builtins (with the address space handling) seems to not have moved yet.
The existing OpenCL builtins defined in tablegen do not declare their address
spaces
https://github.com/llvm/llvm-project/pull/72556
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits