[PATCH] D107770: [CallPromotion] Fix byval/inalloca handling

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 12 14:35:23 PDT 2021


aeubanks abandoned this revision.
aeubanks added a comment.

In D107770#2942427 <https://reviews.llvm.org/D107770#2942427>, @efriedma wrote:

> I'd prefer to prohibit the promotion.
>
> In general, when we see a mismatch in the argument list, we want to be conservative; ABI rules are complicated, so sometimes different frontends will emit different IR signatures for a given function which should be ABI-compatible.  An argument list with byval is effectively a different signature from an argument list without byval.

If we do indirect call promotion guarded by checking the function addresses, it should be fine in terms of correctness, we'd just presumably never do the direct call. I was trying to preserve the current state of allowing ABI-incompatible indirect call promotion. But we might as well just do what you said.
https://reviews.llvm.org/D107998


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107770



More information about the llvm-commits mailing list