[PATCH] D124967: [SROA] Avoid postponing rewriting load/store by ignoring lifetime intrinsics in partition's promotability checking
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 12:57:15 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:1993
+ return true;
+ }
+
----------------
slydiman wrote:
> nikic wrote:
> > These already is a check for `isLifetimeStartOrEnd()` and `isDroppable()` below, only difference is that it's after the `RelEnd > Size` check. I think you'd want to add the `isDroppable()` check here as well, and then drop the IntrinsicInst handling below entirely.
> >
> > You can also move the `Use *U = S.getUse();` line before here.
> I have moved `Use *U = S.getUse();`.
> Please note I cannot move isDroppable() bacause this block depends on the previous block
> ```
> } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(U->getUser())) {
> ```
> and such moving will break the current logic.
Do you mean in case a MemIntrinsic is droppable? This cannot happen ("droppable" here means "assume intrinsic" or similar).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124967/new/
https://reviews.llvm.org/D124967
More information about the llvm-commits
mailing list