LLVM 22.0.0git
llvm::GVNExpression::BasicExpression Class Reference

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

Inheritance diagram for llvm::GVNExpression::BasicExpression:
[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 exactlyEquals (const Expression &Other) const
unsigned getOpcode () const
void setOpcode (unsigned opcode)
ExpressionType getExpressionType () 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

◆ op_iterator

Constructor & Destructor Documentation

◆ BasicExpression() [1/4]

◆ BasicExpression() [2/4]

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

Definition at line 149 of file GVNExpression.h.

References llvm::GVNExpression::Expression::Expression().

◆ BasicExpression() [3/4]

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

◆ BasicExpression() [4/4]

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

References BasicExpression().

◆ ~BasicExpression()

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

Member Function Documentation

◆ allocateOperands()

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

Definition at line 202 of file GVNExpression.h.

References Allocator, and assert().

◆ classof()

◆ deallocateOperands()

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

Definition at line 206 of file GVNExpression.h.

◆ equals()

◆ getHashValue()

◆ 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(), and N.

◆ 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.

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

◆ op_begin() [2/2]

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

Definition at line 186 of file GVNExpression.h.

◆ 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.

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

◆ op_end() [2/2]

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

Definition at line 187 of file GVNExpression.h.

◆ op_push_back()

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

Definition at line 195 of file GVNExpression.h.

References assert().

◆ 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().

Referenced by getHashValue().

◆ 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

References BasicExpression().

◆ printInternal()

◆ setOperand()

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

Definition at line 173 of file GVNExpression.h.

References assert(), and N.

◆ 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, and std::swap().


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