[PATCH] D127190: [analyzer][NFC] Add LLVM_UNLIKELY to assumeDualImpl
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 7 01:33:54 PDT 2022
martong created this revision.
martong added a reviewer: steakhal.
Herald added subscribers: manas, ASDenysPetrov, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a reviewer: Szelethus.
Herald added a project: All.
martong requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Aligned with the measures we had in D124674 <https://reviews.llvm.org/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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127190
Files:
clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp
Index: clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp
+++ clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp
@@ -47,7 +47,7 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127190.434728.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220607/175e233b/attachment.bin>
More information about the cfe-commits
mailing list