[PATCH] D149768: [ArgumentPromotion] Bail if any callers are minsize and more instructions are added than removed
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 15:00:10 PDT 2023
smeenai added a comment.
Okay, I think the heuristic is falling short by not considering that callers of the functions might have had the argument promoted themselves. As in, if I'm understanding this correctly, right now if you have function `f` with an argument which would have one load eliminated by argpromo but has two callers `g` and `h`, you won't promote the argument. However, `g` and `h` might have had the argument promoted themselves, so they're not actually paying any size cost for the promotion (their transitive callers might at some point, but it could still be worth it overall). There's also the potential for further simplification if e.g. only one member of a struct is used.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149768/new/
https://reviews.llvm.org/D149768
More information about the llvm-commits
mailing list