[PATCH] D90122: [NFC][Reg2Mem] modernize loops iterators

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 06:52:32 PDT 2020


dmgreen added a comment.

instructions(F) is a new one to me. Very smart. I'll have to remember to use it elsewhere.



================
Comment at: llvm/lib/Transforms/Scalar/Reg2Mem.cpp:95
+  for (Instruction &I : instructions(F))
+    if (!(isa<AllocaInst>(I) && I.getParent() == BBEntry) && valueEscapes(I)) {
+      WorkList.push_front(&I);
----------------
This doesn't need brackets now I think.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90122



More information about the llvm-commits mailing list