llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
#include <core/user.h>
Classes | |
struct | const_conv_op_iterator |
struct | const_unref_iterator |
struct | const_value_op_iterator |
struct | conv_op_iterator |
struct | unref_iterator |
struct | value_op_iterator |
Public Types | |
using | op_iterator = Use * |
using | const_op_iterator = const Use * |
using | op_range = llvm::iterator_range< op_iterator > |
using | const_op_range = llvm::iterator_range< const_op_iterator > |
using | value_op_range = llvm::iterator_range< value_op_iterator > |
using | const_value_op_range = llvm::iterator_range< const_value_op_iterator > |
template<typename T > | |
using | conv_op_range = llvm::iterator_range< conv_op_iterator< T > > |
template<typename T > | |
using | const_conv_op_range = llvm::iterator_range< const_conv_op_iterator< T > > |
template<typename T > | |
using | unref_range = llvm::iterator_range< unref_iterator< T > > |
template<typename T > | |
using | const_unref_range = llvm::iterator_range< const_unref_iterator< T > > |
![]() | |
enum | Kind { INST, GLOBAL, EXPR, CONST } |
Enumeration of value types. | |
template<typename T > | |
using | forward_it = std::iterator< std::forward_iterator_tag, T > |
using | use_iterator = use_iterator_impl< Use > |
using | const_use_iterator = use_iterator_impl< const Use > |
using | user_iterator = user_iterator_impl< User > |
using | const_user_iterator = user_iterator_impl< const User > |
Public Member Functions | |
User (Kind kind, unsigned numOps) | |
Creates a new user. | |
virtual | ~User () |
Cleans up after the use. | |
size_t | size () const |
op_iterator | op_begin () |
op_iterator | op_end () |
op_range | operands () |
const_op_iterator | op_begin () const |
const_op_iterator | op_end () const |
const_op_range | operands () const |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
value_op_range | operand_values () |
const_value_op_iterator | value_op_begin () const |
const_value_op_iterator | value_op_end () const |
const_value_op_range | operand_values () const |
![]() | |
Value (Kind kind) | |
Constructs a new value. | |
Value (const Value &)=delete | |
Do not allow copying. | |
Value (Value &&)=delete | |
Do not allow moving. | |
virtual | ~Value () |
Destroy the value. | |
Kind | GetKind () const |
Returns the value kind. | |
bool | Is (Kind kind) const |
Checks if the value is of a specific kind. | |
bool | IsConstant () const |
Checks whether the value is a compile-time constant. | |
virtual void | replaceAllUsesWith (Value *v) |
Replaces all uses of this value. | |
virtual void | replaceAllUsesWith (Ref< Value > v) |
Replaces all uses of this with a refernce. | |
size_t | use_size () const |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
llvm::iterator_range< use_iterator > | uses () |
llvm::iterator_range< const_use_iterator > | uses () const |
bool | user_empty () const |
user_iterator | user_begin () |
const_user_iterator | user_begin () const |
user_iterator | user_end () |
const_user_iterator | user_end () const |
llvm::iterator_range< user_iterator > | users () |
llvm::iterator_range< const_user_iterator > | users () const |
void | operator= (const Value &)=delete |
Do not allow assignments. | |
void | operator= (Value &&)=delete |
Do not allow move assignments. | |
Protected Member Functions | |
template<int I> | |
void | Set (Ref< Value > val) |
Setter for an operand. | |
void | Set (int i, Ref< Value > val) |
Setter for an operand. | |
template<int I> | |
Ref< Value > | Get () |
Accessor for an operand. | |
Ref< Value > | Get (int i) |
Accessor for an operand. | |
template<int I> | |
ConstRef< Value > | Get () const |
Accessor for an operand. | |
ConstRef< Value > | Get (int i) const |
Accessor for an operand. | |
void | resizeUses (unsigned n) |
Grows the operand list. | |
Protected Attributes | |
unsigned | numOps_ |
Number of operands. | |
Use * | uses_ |
Head of the use list. | |
Value which references other values.