[PATCH] D120382: [Mangler] Mangle aliases to fastcall/vectorcall functions correctly

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 13:19:01 PST 2022


rnk added a comment.

I have some misgivings about this, but I think this is probably the best way forward for now.

I think it was always a mistake to do IR mangling based on the calling convention and prototype. However, that's what we do, and removing that is a long process. FWIW clang never relies on the IR mangler for functions like this, it does the mangling itself.

The other way to handle this is to teach merge functions to do IR mangling. Merge functions can create a Mangler object with the DataLayout from the Module. Then it can create escaped aliases with names like `"\01 at foo@20"`. After thinking about it, I think I prefer your approach, despite the surprising behavior.

In the long run, I would like to remove this calling convention mangling altogether, at which point this change will be deleted.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120382



More information about the llvm-commits mailing list