PATCH: More thorough cleanup of NVPTX-generated global names

Eli Bendersky eliben at
Wed Mar 26 16:24:27 PDT 2014


As discussed in PR19099, the solution in r203483 was imperfect. While we
could fix global names when they are emitted in directives, this does not
work for their usage within instructions. Instruction emission is
hard-coded through MI and NVPTX does not control this.

A more thorough solution is a target-specific IR pass that replaces all
invalid characters in symbol names before they go into codegen. This makes
sure that invalid characters will never appear in symbols in PTX.

An added benefit is that this avoids collisions because Value->setName does
automatic collision resolution.

Once this goes in, most of r203483 can be reverted (I'll take care of that).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup-nvptx-symbol-names.1.patch
Type: text/x-patch
Size: 6206 bytes
Desc: not available
URL: <>

More information about the llvm-commits mailing list