[clang] [clang][FlowSensitive] Do a quick check and bail early for massive CFGs (PR #186808)
Jan Voung via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 18 07:51:19 PDT 2026
================
@@ -496,6 +519,14 @@ runTypeErasedDataflowAnalysis(
MaybeStartingEnv ? *MaybeStartingEnv : InitEnv;
const clang::CFG &CFG = ACFG.getCFG();
+ if (CFG.size() > static_cast<size_t>(MaxBlockVisits)) {
+ if (CFG.size() > NumBlockVisitsIfVisitEachReachableOnce(CFG)) {
----------------
jvoung wrote:
Oops, yes -- fixed the comparison, and added a test.
Added some comments too.
https://github.com/llvm/llvm-project/pull/186808
More information about the cfe-commits
mailing list