[PATCH] D40573: [NVPTX] Assign valid global names

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 12:21:31 PST 2017


Hahnfeld created this revision.
Herald added a subscriber: jholewinski.

PTX requires that identifiers consist only of [a-zA-Z0-9_$]. The
existing pass already ensured this for globals and this patch adds
the cleanup for functions with local linkage.

However, there was a different problem in the case of collisions
of the adjusted name: The ValueSymbolTable then automatically
appended ".N" with increasing Ns to get a unique name. Special
case this behavior to use dollar signs instead of dots to get legal
names according to the PTX requirements.


https://reviews.llvm.org/D40573

Files:
  lib/IR/ValueSymbolTable.cpp
  lib/Target/NVPTX/NVPTXAssignValidGlobalNames.cpp
  test/CodeGen/NVPTX/symbol-naming.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40573.124616.patch
Type: text/x-patch
Size: 3451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171128/03b6d9d5/attachment.bin>


More information about the llvm-commits mailing list