[PATCH] D124178: [ArgPromotion] Change the condition to check the promotion limit
Pavel Samolysov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 05:07:43 PDT 2022
psamolysov marked an inline comment as done.
psamolysov added inline comments.
================
Comment at: llvm/include/llvm/Transforms/IPO/ArgumentPromotion.h:28
public:
- ArgumentPromotionPass(unsigned MaxElements = 3u) : MaxElements(MaxElements) {}
+ ArgumentPromotionPass(unsigned MaxElements = 2u) : MaxElements(MaxElements) {}
----------------
aeubanks wrote:
> `MaxElements` is also used elsewhere (handling byval args) besides the one place below.
>
> I think making the two uses consistent makes sense and should be ok, but that should be noted in the description (this doesn't preserve existing behavior as currently stated). if somebody complains about this regressing anything, we can split `MaxElement` into two separate parameters
@aeubanks Thank you for the comment. I've changed the description to make it more concrete, the changing of the default `MaxElement` value preserves existing behavior for argument promoting but changes behavior for byval argument transformation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124178/new/
https://reviews.llvm.org/D124178
More information about the llvm-commits
mailing list