llvm-project
6a0fc477 - [analyzer][NFC] Check the lock state first in BlockInCriticalSectionChecker (#245798)

Commit
3 days ago
[analyzer][NFC] Check the lock state first in BlockInCriticalSectionChecker (#245798) BlockInCriticalSectionChecker::isBlockingInCritSection is called for every call. It matched the call against the list of blocking functions before checking whether any critical section is active, which is rarely the case and only needs a lookup of the ActiveCritSections trait. Check the lock state first. On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this reduces the instructions of the static analyzer by 0.4-0.7%. Assisted-by: Claude Opus 5.5 Co-authored-by: Gabor Horvath <gaborh@apple.com>
Author
Parents
Loading