class DemandedBits
Declaration
class DemandedBits { /* full declaration omitted */ };
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:40
Member Variables
- private llvm::Function& F
- private llvm::AssumptionCache& AC
- private llvm::DominatorTree& DT
- private bool Analyzed = false
- private SmallPtrSet<llvm::Instruction*, 32> Visited
- private DenseMap<llvm::Instruction*, llvm::APInt> AliveBits
- private SmallPtrSet<llvm::Use*, 16> DeadUses
Method Overview
- public DemandedBits(llvm::Function & F, llvm::AssumptionCache & AC, llvm::DominatorTree & DT)
- private void determineLiveOperandBits(const llvm::Instruction * UserI, const llvm::Value * Val, unsigned int OperandNo, const llvm::APInt & AOut, llvm::APInt & AB, llvm::KnownBits & Known, llvm::KnownBits & Known2, bool & KnownBitsComputed)
- public static llvm::APInt determineLiveOperandBitsAdd(unsigned int OperandNo, const llvm::APInt & AOut, const llvm::KnownBits & LHS, const llvm::KnownBits & RHS)
- public static llvm::APInt determineLiveOperandBitsSub(unsigned int OperandNo, const llvm::APInt & AOut, const llvm::KnownBits & LHS, const llvm::KnownBits & RHS)
- public llvm::APInt getDemandedBits(llvm::Instruction * I)
- public llvm::APInt getDemandedBits(llvm::Use * U)
- public bool isInstructionDead(llvm::Instruction * I)
- public bool isUseDead(llvm::Use * U)
- private void performAnalysis()
- public void print(llvm::raw_ostream & OS)
Methods
¶DemandedBits(llvm::Function& F,
llvm::AssumptionCache& AC,
llvm::DominatorTree& DT)
DemandedBits(llvm::Function& F,
llvm::AssumptionCache& AC,
llvm::DominatorTree& DT)
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:42
Parameters
¶void determineLiveOperandBits(
const llvm::Instruction* UserI,
const llvm::Value* Val,
unsigned int OperandNo,
const llvm::APInt& AOut,
llvm::APInt& AB,
llvm::KnownBits& Known,
llvm::KnownBits& Known2,
bool& KnownBitsComputed)
void determineLiveOperandBits(
const llvm::Instruction* UserI,
const llvm::Value* Val,
unsigned int OperandNo,
const llvm::APInt& AOut,
llvm::APInt& AB,
llvm::KnownBits& Known,
llvm::KnownBits& Known2,
bool& KnownBitsComputed)
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:83
Parameters
- const llvm::Instruction* UserI
- const llvm::Value* Val
- unsigned int OperandNo
- const llvm::APInt& AOut
- llvm::APInt& AB
- llvm::KnownBits& Known
- llvm::KnownBits& Known2
- bool& KnownBitsComputed
¶static llvm::APInt determineLiveOperandBitsAdd(
unsigned int OperandNo,
const llvm::APInt& AOut,
const llvm::KnownBits& LHS,
const llvm::KnownBits& RHS)
static llvm::APInt determineLiveOperandBitsAdd(
unsigned int OperandNo,
const llvm::APInt& AOut,
const llvm::KnownBits& LHS,
const llvm::KnownBits& RHS)
Description
Compute alive bits of one addition operand from alive output and known operand bits
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:69
Parameters
- unsigned int OperandNo
- const llvm::APInt& AOut
- const llvm::KnownBits& LHS
- const llvm::KnownBits& RHS
¶static llvm::APInt determineLiveOperandBitsSub(
unsigned int OperandNo,
const llvm::APInt& AOut,
const llvm::KnownBits& LHS,
const llvm::KnownBits& RHS)
static llvm::APInt determineLiveOperandBitsSub(
unsigned int OperandNo,
const llvm::APInt& AOut,
const llvm::KnownBits& LHS,
const llvm::KnownBits& RHS)
Description
Compute alive bits of one subtraction operand from alive output and known operand bits
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:76
Parameters
- unsigned int OperandNo
- const llvm::APInt& AOut
- const llvm::KnownBits& LHS
- const llvm::KnownBits& RHS
¶llvm::APInt getDemandedBits(llvm::Instruction* I)
llvm::APInt getDemandedBits(llvm::Instruction* I)
Description
Return the bits demanded from instruction I. For vector instructions individual vector elements are not distinguished: A bit is demanded if it is demanded for any of the vector elements. The size of the return value corresponds to the type size in bits of the scalar type. Instructions that do not have integer or vector of integer type are accepted, but will always produce a mask with all bits set.
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:54
Parameters
¶llvm::APInt getDemandedBits(llvm::Use* U)
llvm::APInt getDemandedBits(llvm::Use* U)
Description
Return the bits demanded from use U.
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:57
Parameters
- llvm::Use* U
¶bool isInstructionDead(llvm::Instruction* I)
bool isInstructionDead(llvm::Instruction* I)
Description
Return true if, during analysis, I could not be reached.
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:60
Parameters
¶bool isUseDead(llvm::Use* U)
bool isUseDead(llvm::Use* U)
Description
Return whether this use is dead by means of not having any demanded bits.
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:63
Parameters
- llvm::Use* U
¶void performAnalysis()
void performAnalysis()
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:82
¶void print(llvm::raw_ostream& OS)
void print(llvm::raw_ostream& OS)
Declared at: llvm/include/llvm/Analysis/DemandedBits.h:65