[PATCH] D73307: Unique Names for Functions with Internal Linkage

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 17 18:46:51 PDT 2020


erichkeane added a comment.



> Thanks for the comments!  I was one of the authors of the GCC multiversioning patch, and if I recall correctly from years ago, one of the reasons for naming the target clones of multi-versioned foo as foo, foo.sse, etc. was so that c++filt works nicely on this.  Like, c++filt on _Z3foov.see would demangle as foo() [clone sse].  But c++filt  is  broken IMO as it is not handling these suffixes correctly any more, like c++filt _Z3foov.sse4.2 does not even demangle as expected.

Ah :)  I implemented it here, it would have been great to have picked your brain on it back when implementing MV!

c++filt seems hit or miss as to whether it would demangle it.  i think ones with dots in it (sse4.2) doesn't work.

I also implemented CPU-Dispatch/CPU-Specific from ICC at one point which doesn't demangle at all.

It DOES remind me, I had target-clones implemented at one point and under review, but never got back around to it...


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

https://reviews.llvm.org/D73307





More information about the cfe-commits mailing list