[PATCH] D137497: [ArgumentPromotion] Allow the frontend to specify the maximum number of elements to promote on a per-function basis via metadata.
Patrick Walton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 5 22:39:19 PDT 2022
pcwalton added a comment.
As an alternative, I wonder if we could teach SROA to do a form of argument promotion for nocapture noalias readonly dereferenceable aligned arguments. If the only thing blocking an alloca from SROA is being passed into a function by nocapture noalias readonly dereferenceable aligned pointer, insert a new alloca and memcpy to "reform" the structure right before the call, change the call to pass the pointer, and then the original alloca becomes SROAable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137497/new/
https://reviews.llvm.org/D137497
More information about the llvm-commits
mailing list