LLVM 23.0.0git
llvm::VPConstantInt Struct Reference

An overlay on VPIRValue for VPValues that wrap a ConstantInt. More...

#include "Transforms/Vectorize/VPlanValue.h"

Inheritance diagram for llvm::VPConstantInt:
[legend]

Public Member Functions

 VPConstantInt (ConstantInt *CI)
bool isOne () const
bool isZero () const
const APIntgetAPInt () const
unsigned getBitWidth () const
uint64_t getZExtValue () const
Public Member Functions inherited from llvm::VPIRValue
 VPIRValue (Value *UV)
ValuegetValue () const
 Returns the underlying IR value.
TypegetType () const
 Returns the type of the underlying IR value.
Public Member Functions inherited from llvm::VPValue
ValuegetUnderlyingValue () const
 Return the underlying Value attached to this VPValue.
ValuegetLiveInIRValue () const
 Return the underlying IR value for a VPIRValue.
 VPValue (const VPValue &)=delete
VPValueoperator= (const VPValue &)=delete
virtual ~VPValue ()
unsigned getVPValueID () const
void printAsOperand (raw_ostream &OS, VPSlotTracker &Tracker) const
void print (raw_ostream &OS, VPSlotTracker &Tracker) const
void dump () const
 Dump the value to stderr (for debugging).
unsigned getNumUsers () const
void addUser (VPUser &User)
void removeUser (VPUser &User)
 Remove a single User from the list of users.
user_iterator user_begin ()
const_user_iterator user_begin () const
user_iterator user_end ()
const_user_iterator user_end () const
user_range users ()
const_user_range users () const
bool hasMoreThanOneUniqueUser () const
 Returns true if the value has more than one unique user.
bool hasOneUse () const
VPUsergetSingleUser ()
 Return the single user of this value, or nullptr if there is not exactly one user.
const VPUsergetSingleUser () const
void replaceAllUsesWith (VPValue *New)
void replaceUsesWithIf (VPValue *New, llvm::function_ref< bool(VPUser &U, unsigned Idx)> ShouldReplace)
 Go through the uses list for this VPValue and make each use point to New if the callback ShouldReplace returns true for the given use specified by a pair of (VPUser, the use index).
VPRecipeBasegetDefiningRecipe ()
 Returns the recipe defining this VPValue or nullptr if it is not defined by a recipe, i.e.
const VPRecipeBasegetDefiningRecipe () const
bool hasDefiningRecipe () const
 Returns true if this VPValue is defined by a recipe.
bool isDefinedOutsideLoopRegions () const
 Returns true if the VPValue is defined outside any loop.
void setUnderlyingValue (Value *Val)

Static Public Member Functions

static bool classof (const VPValue *V)
Static Public Member Functions inherited from llvm::VPIRValue
static bool classof (const VPValue *V)

Additional Inherited Members

Public Types inherited from llvm::VPValue
enum  { VPVIRValueSC , VPVSymbolicSC , VPVRecipeValueSC }
 An enumeration for keeping track of the concrete subclass of VPValue that are actually instantiated. More...
typedef SmallVectorImpl< VPUser * >::iterator user_iterator
typedef SmallVectorImpl< VPUser * >::const_iterator const_user_iterator
typedef iterator_range< user_iteratoruser_range
typedef iterator_range< const_user_iteratorconst_user_range

Detailed Description

An overlay on VPIRValue for VPValues that wrap a ConstantInt.

Provides convenient accessors for the underlying constant.

Definition at line 204 of file VPlanValue.h.

Constructor & Destructor Documentation

◆ VPConstantInt()

llvm::VPConstantInt::VPConstantInt ( ConstantInt * CI)
inline

Definition at line 205 of file VPlanValue.h.

References llvm::VPIRValue::VPIRValue().

Member Function Documentation

◆ classof()

bool llvm::VPConstantInt::classof ( const VPValue * V)
inlinestatic

Definition at line 207 of file VPlanValue.h.

References llvm::isa().

◆ getAPInt()

const APInt & llvm::VPConstantInt::getAPInt ( ) const
inline

Definition at line 215 of file VPlanValue.h.

References llvm::cast(), and llvm::VPIRValue::getValue().

Referenced by getBitWidth(), getZExtValue(), isOne(), and isZero().

◆ getBitWidth()

unsigned llvm::VPConstantInt::getBitWidth ( ) const
inline

Definition at line 219 of file VPlanValue.h.

References getAPInt(), and llvm::APInt::getBitWidth().

◆ getZExtValue()

uint64_t llvm::VPConstantInt::getZExtValue ( ) const
inline

Definition at line 221 of file VPlanValue.h.

References getAPInt(), and llvm::APInt::getZExtValue().

◆ isOne()

bool llvm::VPConstantInt::isOne ( ) const
inline

Definition at line 211 of file VPlanValue.h.

References getAPInt(), and llvm::APInt::isOne().

◆ isZero()

bool llvm::VPConstantInt::isZero ( ) const
inline

Definition at line 213 of file VPlanValue.h.

References getAPInt(), and llvm::APInt::isZero().


The documentation for this struct was generated from the following file: