[PATCH] D125485: [ArgPromotion] Unify byval promotion with non-byval

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 01:43:24 PDT 2022


nikic added a comment.

@psamolysov What I had in mind is something along the following lines:

- For byval, allow stores -- however, these should still use the same checks as loads, i.e. be part of ArgParts collection. We need to make sure that different loads/stores don't have any partial overlaps.
- For byval, drop the check for interfering mods.
- Change promotion to work by rewriting accesses to an alloca (as is currently done for byval promotion) and then call promoteMemoryToRegister(). Our earlier checks have ensured that promoteMemoryToRegister() will succeed. (For the non-byval case, we don't really need alloca+mem2reg, but it would help with unifying the implementations.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125485



More information about the llvm-commits mailing list