[PATCH] D83906: [CodeGen] Emit a call instruction instead of an invoke if the called llvm function is marked nounwind
Hongtao Yu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 9 12:03:39 PST 2023
hoy added a comment.
In D83906#4182287 <https://reviews.llvm.org/D83906#4182287>, @dexonsmith wrote:
> In C++, you get linkonce_odr all over the place. It's basically all functions that are defined in C++ headers that are available for inlining.
> On the other hand, the frontend knows the token sequence from the source language. It knows whether function B is inherently nounwind based on its ODR token sequence; in which case, it's safe to use the attribute for an IPA peephole.
Thanks for the detailed explanation again! As you pointed out previously, linkonce_odr is something the front end can optimize. I'm wondering why the front end is confident about that the linker would not replace the current definition with something else.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83906/new/
https://reviews.llvm.org/D83906
More information about the cfe-commits
mailing list