[PATCH] D124514: [ArgPromotion] Make a non-byval promotion attempt first

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 12:21:54 PDT 2022


nikic added a comment.

@psamolysov Right, byval promotion currently doesn't look at how the argument is used -- however, the promotion will only actually be profitable if the introduced alloca can be mem2reg promoted. This will happen if the argument is only used in load/store operations at constant offset, but will generally not happen in other cases, in which case we've just made argument passing less efficient for no real benefit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124514



More information about the llvm-commits mailing list