Pointer wrapper that lazily caches KnownBits for the pointed‐to value.

Synopsis

Declared in <llvm/Analysis/WithCache.h>

template<typename Arg>
class WithCache;

Description

Stores a pointer to any type along with the KnownBits information for it that is computed lazily (if required).

Member Functions

Name

Description

WithCache [constructor]

Constructors

getKnownBits

Return known bits for the value, computing them lazily if needed.

getValue

Return the wrapped pointer.

hasKnownBits

Return true if KnownBits have already been computed or provided.

operator*

Dereference the wrapped pointer.

operator‐>

Access members of the pointed‐to value.

operator PointerType

Convert to the wrapped pointer type.

Non-Member Functions

Name

Description

computeConstantRangeIncludingKnownBits

Combine constant ranges from computeConstantRange() and computeKnownBits().

computeOverflowForSignedAdd

Compute whether a signed add of LHS and RHS can overflow.

computeOverflowForUnsignedAdd

Compute whether an unsigned add of LHS and RHS can overflow.

getNoCommonBitsSetResult

Return how strongly LHS and RHS are known to have no common set bits.

haveNoCommonBitsSet

Return true if LHS and RHS have no common bits set.

Created with MrDocs