[PATCH] D83976: [Mem2Reg] 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/Utils/PromoteMemoryToRegister.cpp:324
+
+    I->dropDroppableUses([&](const Use *U) { return U->getUser() == UserI; });
+  };
----------------
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/D83976/new/

https://reviews.llvm.org/D83976





More information about the llvm-commits mailing list