[PATCH] D89617: Prepend "uniq" to symbol names hash with -funique-internal-linkage-names

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 09:38:23 PDT 2020


tmsriram added a comment.

In D89617#2339607 <https://reviews.llvm.org/D89617#2339607>, @mtrofin wrote:

> In D89617#2339557 <https://reviews.llvm.org/D89617#2339557>, @tmsriram wrote:
>
>> Incorporating snehasishk@'s suggestion that "llvmuniq" is a better prefix for tools to search on.
>>
>> Having "llvmuniq" makes reduces chances of collisions with other suffixes that might get introduced.  Consistent with the ".llvm." prefix for lto global name promotion suffixes.
>
> Unique-ing names this way isn't, at core, something that's too tied to llvm, even if we implement it here first. There are tools that would leverage this feature by binding to the suffix. With a look at other present or future compilers, and given that making this decision now is free, and much more expensive later, I think it would be beneficial if we were intentional about:
>
> - not using "llvm" to indicate this is something tool-generated, and instead use, say "__" (".__uniq.")
>
> or
>
> - using "llvm", on the grounds that there are other examples of general-purpose concepts that have tool-specific prefixes (like gcc_except_table, that is supported in llvm); so the prefixed name is basically a proper noun, it doesn't mean "llvm only" or "gcc only".
>
> I believe either way, the ".llvm." case is going to stick out as an inconsistency: it should have been either ".llvmlto." or "__lto", in either case, I don't think it serves too well as an argument for the llvm prefix.

Acknowledged and great points.  I just want to add that we should pick something that would minimize collisions with future ISA names that would land as suffixes with multiversion symbols.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89617/new/

https://reviews.llvm.org/D89617



More information about the llvm-commits mailing list