LLVM  8.0.1
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]
Collaboration diagram for llvm::GVNExpression::BasicExpression:
Collaboration 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. More...
 
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 137 of file GVNExpression.h.

Member Typedef Documentation

◆ const_op_iterator

Definition at line 183 of file GVNExpression.h.

◆ op_iterator

Definition at line 182 of file GVNExpression.h.

Constructor & Destructor Documentation

◆ BasicExpression() [1/4]

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

Definition at line 148 of file GVNExpression.h.

◆ BasicExpression() [2/4]

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

Definition at line 150 of file GVNExpression.h.

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

◆ 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

Definition at line 203 of file GVNExpression.h.

References llvm::ArrayRecycler< T, Align >::allocate(), and assert().

Referenced by alwaysAvailable().

◆ classof()

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

◆ deallocateOperands()

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

Definition at line 207 of file GVNExpression.h.

References llvm::ArrayRecycler< T, Align >::deallocate().

◆ 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 180 of file GVNExpression.h.

◆ getOperand()

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

Definition at line 168 of file GVNExpression.h.

References assert(), and N.

Referenced by alwaysAvailable().

◆ getType()

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

Definition at line 212 of file GVNExpression.h.

◆ op_begin() [1/2]

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

Definition at line 185 of file GVNExpression.h.

◆ op_begin() [2/2]

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

Definition at line 187 of file GVNExpression.h.

◆ op_empty()

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

Definition at line 201 of file GVNExpression.h.

◆ op_end() [1/2]

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

Definition at line 186 of file GVNExpression.h.

◆ op_end() [2/2]

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

Definition at line 188 of file GVNExpression.h.

◆ op_push_back()

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

Definition at line 196 of file GVNExpression.h.

References Arg, and assert().

Referenced by alwaysAvailable(), and llvm::GVNExpression::op_inserter::operator=().

◆ operands() [1/2]

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

Definition at line 189 of file GVNExpression.h.

◆ operands() [2/2]

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

Definition at line 192 of file GVNExpression.h.

◆ 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 174 of file GVNExpression.h.

References assert(), and N.

◆ setType()

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

Definition at line 211 of file GVNExpression.h.

References T.

Referenced by alwaysAvailable().

◆ 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 164 of file GVNExpression.h.

References std::swap().


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