[PATCH] D83978: [SROA] Teach promote to register about droppable instructions

Tyker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 21:16:23 PDT 2020


Tyker accepted this revision.
Tyker added a comment.
This revision is now accepted and ready to land.

just one nit



================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:3094
+
+    assert(II.getArgOperand(1) == OldPtr);
     // Lifetime intrinsics are only promotable if they cover the whole alloca.
----------------
Tyker wrote:
> Same as https://reviews.llvm.org/D83976#inline-773557
using dropDroppableUses this way is a bit weird since it is already doing a traversal through the uses but it is correct.

maybe an API to drop a single use would be appropriate.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83978





More information about the llvm-commits mailing list