[nvptx] Replace dots in function names
When function splitting clones a function sinf in the host compiler, the clone
is callled sinf.part.0. However, ptx does not allows dots in identifiers, so
we run into:
...
ptxas test.o, line 23; fatal : Parsing error near '.part': syntax error
ptxas fatal : Ptx assembly aborted due to errors
nvptx-as: ptxas returned 255 exit status
...
Rename such functions by replacing the dots with dollar signs.
Tested check-gcc on nvptx.
Tested libgomp on x86_64-linux with nvptx accelerator.
gcc/ChangeLog:
2020-10-10 Tom de Vries <tdevries@suse.de>
PR target/97318
* config/nvptx/nvptx.c (nvptx_replace_dot): New function.
(write_fn_proto, write_fn_proto_from_insn, nvptx_output_call_insn):
Use nvptx_replace_dot.