LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::DemandedBits Class Reference

#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. More...
 
bool isInstructionDead (Instruction *I)
 Return true if, during analysis, I could not be reached. More...
 
bool isUseDead (Use *U)
 Return whether this use is dead by means of not having any demanded bits. More...
 
void print (raw_ostream &OS)
 

Detailed Description

Definition at line 40 of file DemandedBits.h.

Constructor & Destructor Documentation

◆ DemandedBits()

llvm::DemandedBits::DemandedBits ( Function F,
AssumptionCache AC,
DominatorTree DT 
)
inline

Definition at line 42 of file DemandedBits.h.

References getDemandedBits(), I, isInstructionDead(), isUseDead(), and print().

Member Function Documentation

◆ getDemandedBits()

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 419 of file DemandedBits.cpp.

References llvm::APInt::getAllOnesValue(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::Type::getScalarType(), and llvm::Value::getType().

Referenced by bitTrackingDCE(), clearAssumptionsOfUsers(), llvm::computeMinimumValueSizes(), computeRecurrenceType(), and DemandedBits().

◆ isInstructionDead()

bool DemandedBits::isInstructionDead ( Instruction I)

Return true if, during analysis, I could not be reached.

Definition at line 431 of file DemandedBits.cpp.

References isAlwaysLive().

Referenced by bitTrackingDCE(), and DemandedBits().

◆ isUseDead()

bool DemandedBits::isUseDead ( Use U)

Return whether this use is dead by means of not having any demanded bits.

Definition at line 438 of file DemandedBits.cpp.

References llvm::Value::getType(), isAlwaysLive(), and llvm::Type::isIntOrIntVectorTy().

Referenced by bitTrackingDCE(), and DemandedBits().

◆ print()

void DemandedBits::print ( raw_ostream OS)

The documentation for this class was generated from the following files: