[PATCH] D28511: Skip loop header when we can computing loop safety info

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 05:36:20 PST 2017


hfinkel added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:450
   // Iterate over loop instructions and compute safety info.
-  for (Loop::block_iterator BB = CurLoop->block_begin(),
+  // The first block in loopinfo.Blocks is guaranteed to be the header.
+  assert(Header == *CurLoop->getBlocks().begin() && "First block must be header");
----------------
Comment on why you're skipping the header.


https://reviews.llvm.org/D28511





More information about the llvm-commits mailing list