[all-commits] [llvm/llvm-project] 17b19c: [analyzer] Unroll loops of compile-time upper-boun...
Balázs Benics via All-commits
all-commits at lists.llvm.org
Tue Nov 25 04:17:18 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 17b19c50349053ed7721357f806233d633696bf0
https://github.com/llvm/llvm-project/commit/17b19c50349053ed7721357f806233d633696bf0
Author: Balázs Benics <benicsbalazs at gmail.com>
Date: 2025-11-25 (Tue, 25 Nov 2025)
Changed paths:
M clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
M clang/test/Analysis/loop-unrolling.cpp
Log Message:
-----------
[analyzer] Unroll loops of compile-time upper-bounded loops (#169400)
Previously, only literal upper-bounded loops were recognized. This patch
relaxes this matching to accept any compile-time deducible constant
expression.
It would be better to rely on the SVals (values from the symbolic
domain), as those could potentially have more accurate answers, but this
one is much simpler.
Note that at the time we calculate this value, we have not evaluated the
sub-exprs of the condition, consequently, we can't just query the
Environment for the folded SVal.
Because of this, the next best tool in our toolbox is comp-time
evaluating the Expr.
rdar://165363923
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list