[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 27 07:02:26 PDT 2020


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

(I missed the comment, apologies)



================
Comment at: llvm/lib/IR/Value.cpp:197
+  dropDroppableUses([&](const Use *U) { return U->getUser() == &Usr; });
+}
+
----------------
fhahn wrote:
> efriedma wrote:
> > This seems like a dubious pattern; you're iterating over the entire use list of the value each time you call dropDroppableUsesByUser, which is likely a lot more expensive than iterating over the operand list of the assume.
> @jdoerfert  @Tyker Any more thoughts on Eli's point?
I have no particular preference. Unclear what is better (over time). I'll propose a follow up patch that uses the assume operands instead.


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