[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
Sat Mar 11 13:57:14 PST 2023


hoy added a comment.

In D83906#4184916 <https://reviews.llvm.org/D83906#4184916>, @dexonsmith wrote:

> In D83906#4183453 <https://reviews.llvm.org/D83906#4183453>, @hoy wrote:
>
>> Wondering if we can come up with a way to tell the optimizer about that, e.g., through a new module flag. When it comes to LTO, the selection of linkonce_odr symbols should already been done and the optimizer may be able to recompute the attributes based on pre-LTO attributes, or at least we can allow IPO to one module only, which should still do a better job than FE does?
>
> I don't think there's much point in passing anything to LTO. There are very few `linkonce_odr` symbols in LTO, since LTO has the advantage of an export list from the link. Symbols not on the export list are internalized (they're given local linkage).

That sounds to me an opportunity to get a broader IPO done precisely in the prelink optimizer, as long as we find a way to tell it the incoming IR has source fidelity. What do you think about idea of introducing a module flag? Maybe it's worth discussing in the forum as a followup of introducing a cc1 flag for a stable IR gen.


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