[PATCH] D83976: [Mem2Reg] Teach promote to register about droppable instructions

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 21:16:36 PDT 2020


jdoerfert marked an inline comment as done.
jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:324
+
+    I->dropDroppableUses([&](const Use *U) { return U->getUser() == UserI; });
+  };
----------------
Tyker wrote:
> 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.
I'll look into it and update this. I'll commit it if it seems straight forward, post review if anyone disagrees.


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