From 17e9ea61389411f3142b1a34989d3a1a42a5f1fb Mon Sep 17 00:00:00 2001 From: Gabor Marton Date: Tue, 7 Jun 2022 10:29:54 +0200 Subject: [PATCH] [analyzer][NFC] Add LLVM_UNLIKELY to assumeDualImpl Aligned with the measures we had in D124674, this condition seems to be unlikely. Nevertheless, I've made some new measurments with stats just for this, and data confirms this is indeed unlikely. Differential Revision: https://reviews.llvm.org/D127190 --- clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp index bfda9672909b..9ef3455a110a 100644 --- a/clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp @@ -47,7 +47,7 @@ template ConstraintManager::ProgramStatePair ConstraintManager::assumeDualImpl(ProgramStateRef &State, AssumeFunction &Assume) { - if (State->isPosteriorlyOverconstrained()) + if (LLVM_UNLIKELY(State->isPosteriorlyOverconstrained())) return {State, State}; // Assume functions might recurse (see `reAssume` or `tryRearrange`). During