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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 12:21:20 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/IR/Value.cpp:197
+  dropDroppableUses([&](const Use *U) { return U->getUser() == &Usr; });
+}
+
----------------
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.


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