[PATCH] D144999: [RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs.
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 19:46:17 PST 2023
int3 added a comment.
> One issue is that we need to emit ONLY dwarf-unwind for those functions which use nonstandard personalities, while femit-dwarf-unwind enables emitting both compact-unwind and dwarf unwind.
So IMO the ideal design is that we emit both and have the linker fall back to DWARF unwind info if the number of personalities is too large.
> Another issue is that this is an assembler flag, and especially in LTO mode, we would not want to use dwarf unwind on ALL functions, only those using a non-standard personality.
Hm, how does LTO mode make a difference?
Anyway if we go with the abovementioned idea of having the linker decide which encoding to use, then emitting both at compile time doesn't seem like a huge problem (+ was the default behavior until recently).
> Yes, but getting an error when you add an additional object to the link is not a good experience. The default behavior should be to produce reliably-linkable code. But I think it'd be OK to add an LLVM MC option -compact-unwind-all-personalities as an 'expert' option, if you somehow know that in your project, you won't overflow personalities.
Agreed that we shouldn't throw surprising linker errors, but I don't think making all but 3 languages second-class citizens is a good solution either. Having the linker handle multiple languages gracefully seems better.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144999/new/
https://reviews.llvm.org/D144999
More information about the llvm-commits
mailing list