LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::GVNExpression::BasicExpression Class Reference

#include "llvm/Transforms/Scalar/GVNExpression.h"

Inheritance diagram for llvm::GVNExpression::BasicExpression:
Inheritance graph
[legend]

Public Types

using op_iterator = Value **
 
using const_op_iterator = Value *const *
 

Public Member Functions

 BasicExpression (unsigned NumOperands)
 
 BasicExpression (unsigned NumOperands, ExpressionType ET)
 
 BasicExpression ()=delete
 
 BasicExpression (const BasicExpression &)=delete
 
BasicExpressionoperator= (const BasicExpression &)=delete
 
 ~BasicExpression () override
 
void swapOperands (unsigned First, unsigned Second)
 Swap two operands.
 
ValuegetOperand (unsigned N) const
 
void setOperand (unsigned N, Value *V)
 
unsigned getNumOperands () const
 
op_iterator op_begin ()
 
op_iterator op_end ()
 
const_op_iterator op_begin () const
 
const_op_iterator op_end () const
 
iterator_range< op_iteratoroperands ()
 
iterator_range< const_op_iteratoroperands () const
 
void op_push_back (Value *Arg)
 
bool op_empty () const
 
void allocateOperands (RecyclerType &Recycler, BumpPtrAllocator &Allocator)
 
void deallocateOperands (RecyclerType &Recycler)
 
void setType (Type *T)
 
TypegetType () const
 
bool equals (const Expression &Other) const override
 
hash_code getHashValue () const override
 
void printInternal (raw_ostream &OS, bool PrintEType) const override
 
- Public Member Functions inherited from llvm::GVNExpression::Expression
 Expression (ExpressionType ET=ET_Base, unsigned O=~2U)
 
 Expression (const Expression &)=delete
 
Expressionoperator= (const Expression &)=delete
 
virtual ~Expression ()
 
bool operator!= (const Expression &Other) const
 
bool operator== (const Expression &Other) const
 
hash_code getComputedHash () const
 
virtual bool equals (const Expression &Other) const
 
virtual bool exactlyEquals (const Expression &Other) const
 
unsigned getOpcode () const
 
void setOpcode (unsigned opcode)
 
ExpressionType getExpressionType () const
 
virtual hash_code getHashValue () const
 
virtual void printInternal (raw_ostream &OS, bool PrintEType) const
 
void print (raw_ostream &OS) const
 
LLVM_DUMP_METHOD void dump () const
 

Static Public Member Functions

static bool classof (const Expression *EB)
 
- Static Public Member Functions inherited from llvm::GVNExpression::Expression
static unsigned getEmptyKey ()
 
static unsigned getTombstoneKey ()
 

Detailed Description

Definition at line 136 of file GVNExpression.h.

Member Typedef Documentation

◆ const_op_iterator

Definition at line 182 of file GVNExpression.h.

◆ op_iterator

Definition at line 181 of file GVNExpression.h.

Constructor & Destructor Documentation

◆ BasicExpression() [1/4]

llvm::GVNExpression::BasicExpression::BasicExpression ( unsigned  NumOperands)
inline

Definition at line 147 of file GVNExpression.h.

◆ BasicExpression() [2/4]

llvm::GVNExpression::BasicExpression::BasicExpression ( unsigned  NumOperands,
ExpressionType  ET 
)
inline

Definition at line 149 of file GVNExpression.h.

◆ BasicExpression() [3/4]

llvm::GVNExpression::BasicExpression::BasicExpression ( )
delete

◆ BasicExpression() [4/4]

llvm::GVNExpression::BasicExpression::BasicExpression ( const BasicExpression )
delete

◆ ~BasicExpression()

llvm::GVNExpression::BasicExpression::~BasicExpression ( )
overridedefault

Member Function Documentation

◆ allocateOperands()

void llvm::GVNExpression::BasicExpression::allocateOperands ( RecyclerType Recycler,
BumpPtrAllocator Allocator 
)
inline

◆ classof()

static bool llvm::GVNExpression::BasicExpression::classof ( const Expression EB)
inlinestatic

◆ deallocateOperands()

void llvm::GVNExpression::BasicExpression::deallocateOperands ( RecyclerType Recycler)
inline

Definition at line 206 of file GVNExpression.h.

References llvm::ArrayRecycler< T, Align >::Capacity::get(), and Operands.

◆ equals()

bool llvm::GVNExpression::BasicExpression::equals ( const Expression Other) const
inlineoverridevirtual

◆ getHashValue()

hash_code llvm::GVNExpression::BasicExpression::getHashValue ( ) const
inlineoverridevirtual

◆ getNumOperands()

unsigned llvm::GVNExpression::BasicExpression::getNumOperands ( ) const
inline

Definition at line 179 of file GVNExpression.h.

Referenced by op_empty(), and printInternal().

◆ getOperand()

Value * llvm::GVNExpression::BasicExpression::getOperand ( unsigned  N) const
inline

Definition at line 167 of file GVNExpression.h.

References assert(), N, and Operands.

◆ getType()

Type * llvm::GVNExpression::BasicExpression::getType ( ) const
inline

Definition at line 211 of file GVNExpression.h.

Referenced by equals().

◆ op_begin() [1/2]

op_iterator llvm::GVNExpression::BasicExpression::op_begin ( )
inline

Definition at line 184 of file GVNExpression.h.

References Operands.

Referenced by equals(), getHashValue(), and operands().

◆ op_begin() [2/2]

const_op_iterator llvm::GVNExpression::BasicExpression::op_begin ( ) const
inline

Definition at line 186 of file GVNExpression.h.

References Operands.

◆ op_empty()

bool llvm::GVNExpression::BasicExpression::op_empty ( ) const
inline

Definition at line 200 of file GVNExpression.h.

References getNumOperands().

◆ op_end() [1/2]

op_iterator llvm::GVNExpression::BasicExpression::op_end ( )
inline

Definition at line 185 of file GVNExpression.h.

References Operands.

Referenced by equals(), getHashValue(), and operands().

◆ op_end() [2/2]

const_op_iterator llvm::GVNExpression::BasicExpression::op_end ( ) const
inline

Definition at line 187 of file GVNExpression.h.

References Operands.

◆ op_push_back()

void llvm::GVNExpression::BasicExpression::op_push_back ( Value Arg)
inline

Definition at line 195 of file GVNExpression.h.

References assert(), and Operands.

Referenced by llvm::GVNExpression::op_inserter::operator=().

◆ operands() [1/2]

iterator_range< op_iterator > llvm::GVNExpression::BasicExpression::operands ( )
inline

Definition at line 188 of file GVNExpression.h.

References op_begin(), and op_end().

◆ operands() [2/2]

iterator_range< const_op_iterator > llvm::GVNExpression::BasicExpression::operands ( ) const
inline

Definition at line 191 of file GVNExpression.h.

References op_begin(), and op_end().

◆ operator=()

BasicExpression & llvm::GVNExpression::BasicExpression::operator= ( const BasicExpression )
delete

◆ printInternal()

void llvm::GVNExpression::BasicExpression::printInternal ( raw_ostream OS,
bool  PrintEType 
) const
inlineoverridevirtual

◆ setOperand()

void llvm::GVNExpression::BasicExpression::setOperand ( unsigned  N,
Value V 
)
inline

Definition at line 173 of file GVNExpression.h.

References assert(), N, and Operands.

◆ setType()

void llvm::GVNExpression::BasicExpression::setType ( Type T)
inline

Definition at line 210 of file GVNExpression.h.

References T.

◆ swapOperands()

void llvm::GVNExpression::BasicExpression::swapOperands ( unsigned  First,
unsigned  Second 
)
inline

Swap two operands.

Used during GVN to put commutative operands in order.

Definition at line 163 of file GVNExpression.h.

References llvm::First, Operands, and std::swap().


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