Jlm
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
jlm::llvm::AllocaOperation Class Referencefinal

#include <alloca.hpp>

Inheritance diagram for jlm::llvm::AllocaOperation:
Inheritance graph
[legend]
Collaboration diagram for jlm::llvm::AllocaOperation:
Collaboration graph
[legend]

Public Member Functions

 ~AllocaOperation () noexcept override
 
 AllocaOperation (std::shared_ptr< const rvsdg::Type > allocatedType, std::shared_ptr< const rvsdg::BitType > countType, const size_t alignment)
 
 AllocaOperation (const AllocaOperation &other)=default
 
 AllocaOperation (AllocaOperation &&other) noexcept=default
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
const rvsdg::BitTypecountType () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & allocatedType () const noexcept
 
size_t alignment () const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::SimpleOperation
 ~SimpleOperation () noexcept override
 
 SimpleOperation (std::vector< std::shared_ptr< const jlm::rvsdg::Type >> operands, std::vector< std::shared_ptr< const jlm::rvsdg::Type >> results)
 
size_t narguments () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & argument (size_t index) const noexcept
 
size_t nresults () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & result (size_t index) const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::Operation
virtual ~Operation () noexcept
 
virtual bool operator== (const Operation &other) const noexcept=0
 
bool operator!= (const Operation &other) const noexcept
 

Static Public Member Functions

static rvsdg::InputgetCountInput (rvsdg::Node &node)
 
static rvsdg::OutputgetPointerOutput (rvsdg::Node &node)
 
static rvsdg::OutputgetMemoryStateOutput (rvsdg::Node &node)
 
static std::unique_ptr< ThreeAddressCodecreateTac (std::shared_ptr< const rvsdg::Type > allocatedType, const Variable *count, size_t alignment)
 
static rvsdg::SimpleNodecreateNode (std::shared_ptr< const rvsdg::Type > allocatedType, rvsdg::Output &count, const size_t alignment)
 
static std::vector< rvsdg::Output * > create (std::shared_ptr< const rvsdg::Type > allocatedType, rvsdg::Output *count, const size_t alignment)
 

Static Private Member Functions

static std::shared_ptr< const rvsdg::BitTypecheckOperandType (const std::shared_ptr< const rvsdg::Type > &countType)
 

Private Attributes

size_t alignment_
 
std::shared_ptr< const rvsdg::TypeallocatedType_
 

Detailed Description

Definition at line 17 of file alloca.hpp.

Constructor & Destructor Documentation

◆ ~AllocaOperation()

jlm::llvm::AllocaOperation::~AllocaOperation ( )
overridedefaultnoexcept

◆ AllocaOperation() [1/3]

jlm::llvm::AllocaOperation::AllocaOperation ( std::shared_ptr< const rvsdg::Type allocatedType,
std::shared_ptr< const rvsdg::BitType countType,
const size_t  alignment 
)
inline

Definition at line 22 of file alloca.hpp.

◆ AllocaOperation() [2/3]

jlm::llvm::AllocaOperation::AllocaOperation ( const AllocaOperation other)
default

◆ AllocaOperation() [3/3]

jlm::llvm::AllocaOperation::AllocaOperation ( AllocaOperation &&  other)
defaultnoexcept

Member Function Documentation

◆ alignment()

size_t jlm::llvm::AllocaOperation::alignment ( ) const
inlinenoexcept

Definition at line 61 of file alloca.hpp.

◆ allocatedType()

const std::shared_ptr<const rvsdg::Type>& jlm::llvm::AllocaOperation::allocatedType ( ) const
inlinenoexcept

Definition at line 55 of file alloca.hpp.

◆ checkOperandType()

static std::shared_ptr<const rvsdg::BitType> jlm::llvm::AllocaOperation::checkOperandType ( const std::shared_ptr< const rvsdg::Type > &  countType)
inlinestaticprivate

Definition at line 141 of file alloca.hpp.

◆ copy()

std::unique_ptr< rvsdg::Operation > jlm::llvm::AllocaOperation::copy ( ) const
overridevirtual

Implements jlm::rvsdg::Operation.

Definition at line 27 of file alloca.cpp.

◆ countType()

const rvsdg::BitType& jlm::llvm::AllocaOperation::countType ( ) const
inlinenoexcept

Definition at line 47 of file alloca.hpp.

◆ create()

static std::vector<rvsdg::Output *> jlm::llvm::AllocaOperation::create ( std::shared_ptr< const rvsdg::Type allocatedType,
rvsdg::Output count,
const size_t  alignment 
)
inlinestatic

Creates a SimpleNode containing an AllocaOperation.

Parameters
allocatedTypethe type being allocated
countthe number of elements of the given type to allocate. Should almost always be 1.
alignmentthe minimum alignment of the allocation
Returns
the outputs of the created SimpleNode

Definition at line 131 of file alloca.hpp.

◆ createNode()

static rvsdg::SimpleNode& jlm::llvm::AllocaOperation::createNode ( std::shared_ptr< const rvsdg::Type allocatedType,
rvsdg::Output count,
const size_t  alignment 
)
inlinestatic

Creates a SimpleNode containing an AllocaOperation.

Parameters
allocatedTypethe type being allocated
countthe number of elements of the given type to allocate.
alignmentthe minimum alignment of the allocation
Returns
the created SimpleNode

Definition at line 109 of file alloca.hpp.

◆ createTac()

static std::unique_ptr<ThreeAddressCode> jlm::llvm::AllocaOperation::createTac ( std::shared_ptr< const rvsdg::Type allocatedType,
const Variable count,
size_t  alignment 
)
inlinestatic

Definition at line 88 of file alloca.hpp.

◆ debug_string()

std::string jlm::llvm::AllocaOperation::debug_string ( ) const
overridevirtual

Implements jlm::rvsdg::Operation.

Definition at line 21 of file alloca.cpp.

◆ getCountInput()

static rvsdg::Input& jlm::llvm::AllocaOperation::getCountInput ( rvsdg::Node node)
inlinestatic

Definition at line 67 of file alloca.hpp.

◆ getMemoryStateOutput()

static rvsdg::Output& jlm::llvm::AllocaOperation::getMemoryStateOutput ( rvsdg::Node node)
inlinestatic

Definition at line 81 of file alloca.hpp.

◆ getPointerOutput()

static rvsdg::Output& jlm::llvm::AllocaOperation::getPointerOutput ( rvsdg::Node node)
inlinestatic

Definition at line 74 of file alloca.hpp.

◆ operator==()

bool jlm::llvm::AllocaOperation::operator== ( const Operation &  other) const
overridenoexcept

Definition at line 14 of file alloca.cpp.

Member Data Documentation

◆ alignment_

size_t jlm::llvm::AllocaOperation::alignment_
private

Definition at line 149 of file alloca.hpp.

◆ allocatedType_

std::shared_ptr<const rvsdg::Type> jlm::llvm::AllocaOperation::allocatedType_
private

Definition at line 150 of file alloca.hpp.


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