[PATCH] D90487: [CFG] Replace hardcoded max BBs explored as CL option. NFC.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 30 11:15:12 PDT 2020


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

LGTM, one nit though



================
Comment at: llvm/lib/Analysis/CFG.cpp:164
 
-  // Limit the number of blocks we visit. The goal is to avoid run-away compile
-  // times on large CFGs without hampering sensible code. Arbitrarily chosen.
-  unsigned Limit = 32;
+  unsigned Count = 0;
   SmallPtrSet<const BasicBlock*, 32> Visited;
----------------
If you initialize with DefaultMaxBBsToExplore you don't need to read the global multiple times.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90487



More information about the llvm-commits mailing list