[llvm] [Semilattice] Introduce for dataflow analysis with KnownBits (PR #177616)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 06:32:36 PST 2026


artagnon wrote:

> I understand that KnownBits objects can form a semilattice based on an ordering where A<=B means that B is a refinement of A. I do not understand how it follows that "semilattice" refers to the whole datastructure that maps all the Values in a Function to their corresponding KnownBits.

The "semilattice" terminology just refers to KnownBits objects, and can later be extended to represent other objects such as ConstantRange. The Value in the structure is "auxiliary data", and is just used for lookups -- one could imagine the Values being stored in the KnownBits objects, and this structure would then just be a semilattice of KnownBits, with some helpers to build the structure for a given Function.

https://github.com/llvm/llvm-project/pull/177616


More information about the llvm-commits mailing list