[flang-commits] [flang] [flang] Change `uniqueCGIdent` separator from `.` to `_` (PR #71338)

Fabian Mora via flang-commits flang-commits at lists.llvm.org
Mon Nov 6 10:38:58 PST 2023


fabianmcg wrote:

@jeanPerier one option is adding a pass exclusive to NVPTX that renames symbols with dots. I just thought that having a uniform naming scheme was better, I'm open to other options.

> @fabianmcg, can you please clarify if it is a requirement that in the final host and device "images" the variables are named the same way? Will there be any `RegisterVar` call in the host code that takes the variable's device name?

I'm not 100% sure. Strictly speaking, in LLVM IR there are no hard requirements and one only needs to refer to the correct name, so they can be named differently. However, I don't know if there are additional limitations imposed by the current implementation of the OMP dialect and the OpenMP IRbuilder.

One thing to mention is that this issue is not being caused by mapping of symbols, but instead by the addition of literals to the device module, with these literal having invalid identifiers.


https://github.com/llvm/llvm-project/pull/71338


More information about the flang-commits mailing list