[PATCH] D17738: [NVPTX] Fix function identifiers that are invalid in PTX and a bug fix for the case of name collisions.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 10:56:46 PST 2016
>> Wouldn't it be better to error and ask the llvm producer to not create
>> global values with '@' and '.' when targeting nvptx?
>
>
> http://reviews.llvm.org/rL205212 suggests we already do generic sanitizing for all backends. If that's true, why is it inappropriate to do target-specific sanitization in addition? That seems cleaner than playing whack-a-mole in the frontend so it doesn't emit names that aren't valid, when compiling for this target.
I disagree. LLVM has a bad history of playing whack-a-mole with what
names are supported by various formats and assemblers and renaming
stuff in the back. This creates problems with collisions (like you
found) and for any tools that needs to find the final name, like LTO.
The real stable solution I think is for the IR name to be the final
name. No further mangling involved. It will take a lot of work to get
there, but we can avoid making the situation worse.
Cheers,
Rafael
More information about the llvm-commits
mailing list