Determine which bits of V are known to be either zero or one and return them in the KnownZero/KnownOne bit sets.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

void
computeKnownBits(
    Value const* V,
    KnownBits& Known,
    DataLayout const& DL,
    AssumptionCache* AC = nullptr,
    Instruction const* CxtI = nullptr,
    DominatorTree const* DT = nullptr,
    bool UseInstrInfo = true,
    unsigned int Depth = 0);

Description

This function is defined on values with integer type, values with pointer type, and vectors of integers. In the case where V is a vector, the known zero and known one values are the same width as the vector element, and the bit is set only if it is true for all of the elements in the vector.

Parameters

Name

Description

V

Value to analyze.

Known

Output known‐zero and known‐one bits.

DL

Data layout used for type sizes and pointer widths.

AC

Optional assumption cache for context‐sensitive facts.

CxtI

Optional context instruction for local analysis.

DT

Optional dominator tree for context‐sensitive analysis.

UseInstrInfo

Whether to use instruction‐level information.

Depth

Current recursion depth for this query.

Created with MrDocs