LLVM  5.0.0
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:
[legend]
Collaboration diagram for llvm::GVNExpression::BasicExpression:
[legend]

Public Types

typedef Value ** op_iterator
 
typedef Value *const * const_op_iterator
 

Public Member Functions

 BasicExpression (unsigned NumOperands)
 
 BasicExpression (unsigned NumOperands, ExpressionType ET)
 
 BasicExpression ()=delete
 
 BasicExpression (const BasicExpression &)=delete
 
BasicExpression & operator= (const BasicExpression &)=delete
 
 ~BasicExpression () override
 
void swapOperands (unsigned First, unsigned Second)
 Swap two operands. More...
 
Value * getOperand (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_iterator > operands ()
 
iterator_range< const_op_iterator > operands () 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)
 
Type * getType () 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
 
Expression & operator= (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 132 of file GVNExpression.h.

Member Typedef Documentation

Definition at line 178 of file GVNExpression.h.

Definition at line 177 of file GVNExpression.h.

Constructor & Destructor Documentation

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

Definition at line 142 of file GVNExpression.h.

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

Definition at line 144 of file GVNExpression.h.

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

Member Function Documentation

void llvm::GVNExpression::BasicExpression::allocateOperands ( RecyclerType &  Recycler,
BumpPtrAllocator &  Allocator 
)
inline
static bool llvm::GVNExpression::BasicExpression::classof ( const Expression *  EB)
inlinestatic
void llvm::GVNExpression::BasicExpression::deallocateOperands ( RecyclerType &  Recycler)
inline
bool llvm::GVNExpression::BasicExpression::equals ( const Expression &  Other) const
inlineoverridevirtual
hash_code llvm::GVNExpression::BasicExpression::getHashValue ( ) const
inlineoverridevirtual
unsigned llvm::GVNExpression::BasicExpression::getNumOperands ( ) const
inline

Definition at line 175 of file GVNExpression.h.

Referenced by op_empty(), and printInternal().

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

Definition at line 163 of file GVNExpression.h.

References assert(), and N.

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

Definition at line 206 of file GVNExpression.h.

Referenced by equals().

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

Definition at line 179 of file GVNExpression.h.

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

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

Definition at line 181 of file GVNExpression.h.

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

Definition at line 195 of file GVNExpression.h.

References getNumOperands().

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

Definition at line 180 of file GVNExpression.h.

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

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

Definition at line 182 of file GVNExpression.h.

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

Definition at line 190 of file GVNExpression.h.

References assert().

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

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

Definition at line 183 of file GVNExpression.h.

References op_begin(), and op_end().

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

Definition at line 186 of file GVNExpression.h.

References op_begin(), and op_end().

BasicExpression& llvm::GVNExpression::BasicExpression::operator= ( const BasicExpression &  )
delete
void llvm::GVNExpression::BasicExpression::printInternal ( raw_ostream &  OS,
bool  PrintEType 
) const
inlineoverridevirtual
void llvm::GVNExpression::BasicExpression::setOperand ( unsigned  N,
Value *  V 
)
inline

Definition at line 169 of file GVNExpression.h.

References assert(), and N.

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

Definition at line 205 of file GVNExpression.h.

References T.

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

References std::swap().


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