Part of initial Arm64EC patchset.
Canonicalize type to generate thunks, then we can reuse the same name thunks generated before.
Emit thunks to .wowthk section with comdat to make the linker remove the same thunks in different obj files.
Paths
| Differential D133256
[ARM64EC 14/?] Set comdat for thunks and enable wowthk section to help reduce thunk numbers Needs ReviewPublic Authored by bcl5980 on Sep 3 2022, 7:33 AM.
Details
Summary Part of initial Arm64EC patchset. Canonicalize type to generate thunks, then we can reuse the same name thunks generated before.
Diff Detail Event Timelinebcl5980 added a parent revision: D132955: [ARM64EC 13/?] Mangle thunk for arm64ec.Sep 3 2022, 7:34 AM
Revision Contents
Diff 457794 llvm/lib/Target/AArch64/AArch64TargetObjectFile.h
llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp
llvm/test/CodeGen/AArch64/arm64ec-cfg.ll
llvm/test/CodeGen/AArch64/arm64ec-mangle-align.ll
llvm/test/CodeGen/AArch64/arm64ec-mangle-basic.ll
llvm/test/CodeGen/AArch64/arm64ec-mangle-struct.ll
|
You shouldn't need to hack at the backend like this. Just set the section name explicitly in IR, and make the linkage linkonce_odr. That should put it in the right section with the right attributes.