llir-opt  0.0.1
Low-Level Post-Link Optimiser for OCaml and C
Public Types | Public Member Functions | Static Public Attributes | List of all members
Constant Class Reference

#include <core/constant.h>

Inheritance diagram for Constant:
Inheritance graph
[legend]
Collaboration diagram for Constant:
Collaboration graph
[legend]

Public Types

enum  Kind { INT, FLOAT }
 
- Public Types inherited from Value
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

 Constant (Kind kind)
 
Kind GetKind () const
 
bool Is (Kind kind) const
 
- Public Member Functions inherited from Value
 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_iteratoruses ()
 
llvm::iterator_range< const_use_iteratoruses () 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_iteratorusers ()
 
llvm::iterator_range< const_user_iteratorusers () const
 
void operator= (const Value &)=delete
 Do not allow assignments.
 
void operator= (Value &&)=delete
 Do not allow move assignments.
 

Static Public Attributes

static constexpr Value::Kind kValueKind = Value::Kind::CONST
 Kind of the global.
 

Detailed Description

Base class of non-mutable values.

Member Enumeration Documentation

◆ Kind

Enumeration of constant kinds.


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