[PATCH] D50891: [LICM] Hoist guards from non-header blocks

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 13:39:44 PDT 2018


fedor.sergeev added inline comments.


================
Comment at: lib/Analysis/MustExecute.cpp:184
+
+  // Fast path: header is always reached once the loop is entered.
+  if (BB == CurLoop->getHeader())
----------------
I'm not sure fast-path is needed here, it will definitely be handled by the code below and will only be
as slow as initialization of empty Predecessors set.

And, anyway, comment is taken from somewhere else and is a bit confusing.
If you decide to leave it then it should say:
"there are no instructions in this loop before the header."


https://reviews.llvm.org/D50891





More information about the llvm-commits mailing list