[PATCH] D40702: [PGO] More fix to infinite loop profiling

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 11:58:59 PST 2017


vsk added a comment.

This fix lgtm, but I've never touched this code, so it'd be worth getting another +1.



================
Comment at: lib/Transforms/Instrumentation/CFGMST.h:144
+      SmallVector<BasicBlock *, 2> ExitingBlocks;
+      L->getExitingBlocks(ExitingBlocks);
+      if (!ExitingBlocks.empty())
----------------
Nit: it might be nice to add a hasExitingBlocks() predicate to LoopInfo, since it wouldn't do lower-bound(# ExitingBlocks) work.


https://reviews.llvm.org/D40702





More information about the llvm-commits mailing list