[llvm] [Semilattice] Introduce for dataflow analysis with KnownBits (PR #177616)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 15 11:05:52 PST 2026
artagnon wrote:
> > Do a fixpoint-iteration, until the root's KnownBits doesn't change.
>
> IIRC, the height of the lattice may be too high, and we may take many iterations to reach the fix point. That is why we have a `NumRangeExtensions` field in `ValueLatticeElement`. See section 6.2 of https://cs.au.dk/~amoeller/spa/spa.pdf
Thanks, I'm planning to do two iterations for the first patch, and then we can evaluate what the best approach to proceed would be.
> ω′([l,h]) = [max{i∈B |i≤l},min{i∈B |h≤i}]
Since KnownBits don't have a well-defined ordering, I think the equivalent would be starting to optimistic assumptions and pessimising, which works more generally.
https://github.com/llvm/llvm-project/pull/177616
More information about the llvm-commits
mailing list