llvm::computeKnownBits

computeKnownBits overloads

Synopses

Declared in <llvm/Analysis/ValueTracking.h>

Compute known bits for V using the simplify query Q.

KnownBits
computeKnownBits(
    Value const* V,
    SimplifyQuery const& Q,
    unsigned int Depth = 0);
» more...

Compute known bits for V into Known using the simplify query Q.

void
computeKnownBits(
    Value const* V,
    KnownBits& Known,
    SimplifyQuery const& Q,
    unsigned int Depth = 0);
» more...

Compute known bits for the demanded elements of V using Q.

KnownBits
computeKnownBits(
    Value const* V,
    APInt const& DemandedElts,
    SimplifyQuery const& Q,
    unsigned int Depth = 0);
» more...

Returns the known bits rather than passing by reference.

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

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

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);
» more...

Returns the known bits rather than passing by reference.

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

Return Value

  • Known-zero and known-one bits for V.
  • Known-zero and known-one bits for the demanded elements of V.

Parameters

NameDescription
VValue to analyze.
QSimplify query providing context for the analysis.
DepthCurrent recursion depth for this query.
KnownOutput known-zero and known-one bits.
DemandedEltsDemanded vector elements for the query.
DLData layout used for type sizes and pointer widths.
ACOptional assumption cache for context-sensitive facts.
CxtIOptional context instruction for local analysis.
DTOptional dominator tree for context-sensitive analysis.
UseInstrInfoWhether to use instruction-level information.