LLVM 20.0.0git
|
#include "llvm/Analysis/DemandedBits.h"
Public Member Functions | |
DemandedBits (Function &F, AssumptionCache &AC, DominatorTree &DT) | |
APInt | getDemandedBits (Instruction *I) |
Return the bits demanded from instruction I. | |
APInt | getDemandedBits (Use *U) |
Return the bits demanded from use U. | |
bool | isInstructionDead (Instruction *I) |
Return true if, during analysis, I could not be reached. | |
bool | isUseDead (Use *U) |
Return whether this use is dead by means of not having any demanded bits. | |
void | print (raw_ostream &OS) |
Static Public Member Functions | |
static APInt | determineLiveOperandBitsAdd (unsigned OperandNo, const APInt &AOut, const KnownBits &LHS, const KnownBits &RHS) |
Compute alive bits of one addition operand from alive output and known operand bits. | |
static APInt | determineLiveOperandBitsSub (unsigned OperandNo, const APInt &AOut, const KnownBits &LHS, const KnownBits &RHS) |
Compute alive bits of one subtraction operand from alive output and known operand bits. | |
Definition at line 40 of file DemandedBits.h.
|
inline |
Definition at line 42 of file DemandedBits.h.
References F.
|
static |
Compute alive bits of one addition operand from alive output and known operand bits.
Definition at line 553 of file DemandedBits.cpp.
References determineLiveOperandBitsAddCarry(), LHS, and RHS.
|
static |
Compute alive bits of one subtraction operand from alive output and known operand bits.
Definition at line 561 of file DemandedBits.cpp.
References determineLiveOperandBitsAddCarry(), LHS, llvm::KnownBits::One, RHS, and llvm::KnownBits::Zero.
APInt DemandedBits::getDemandedBits | ( | Instruction * | I | ) |
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.
Definition at line 400 of file DemandedBits.cpp.
References DL, llvm::APInt::getAllOnes(), and I.
Referenced by llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), getDemandedBits(), and print().
Return the bits demanded from use U.
Definition at line 411 of file DemandedBits.cpp.
References llvm::BitWidth, DL, llvm::APInt::getAllOnes(), llvm::Instruction::getDataLayout(), getDemandedBits(), and isUseDead().
bool DemandedBits::isInstructionDead | ( | Instruction * | I | ) |
Return true if, during analysis, I could not be reached.
Definition at line 438 of file DemandedBits.cpp.
References I, and isAlwaysLive().
Return whether this use is dead by means of not having any demanded bits.
Definition at line 444 of file DemandedBits.cpp.
References llvm::Value::getType(), isAlwaysLive(), and llvm::Type::isIntOrIntVectorTy().
Referenced by getDemandedBits().
void DemandedBits::print | ( | raw_ostream & | OS | ) |
Definition at line 469 of file DemandedBits.cpp.
References A, getDemandedBits(), llvm::Value::getName(), I, OS, and llvm::Twine::utohexstr().