Jlm
Public Member Functions | Static Public 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 > btype, 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::BitTypesize_type () const noexcept
 
const rvsdg::Typevalue_type () const noexcept
 
const std::shared_ptr< const rvsdg::Type > & ValueType () 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< llvm::ThreeAddressCodecreate (std::shared_ptr< const rvsdg::Type > allocatedType, const Variable *size, size_t alignment)
 
static std::vector< rvsdg::Output * > create (std::shared_ptr< const rvsdg::Type > allocatedType, rvsdg::Output *size, size_t alignment)
 

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 btype,
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 63 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.

◆ create() [1/2]

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

Definition at line 90 of file alloca.hpp.

◆ create() [2/2]

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

Creates a SimpleNode containing an AllocaOperation.

Parameters
allocatedTypethe type being allocated
sizethe 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 108 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 69 of file alloca.hpp.

◆ getMemoryStateOutput()

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

Definition at line 83 of file alloca.hpp.

◆ getPointerOutput()

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

Definition at line 76 of file alloca.hpp.

◆ operator==()

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

Definition at line 14 of file alloca.cpp.

◆ size_type()

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

Definition at line 45 of file alloca.hpp.

◆ value_type()

const rvsdg::Type& jlm::llvm::AllocaOperation::value_type ( ) const
inlinenoexcept

Definition at line 51 of file alloca.hpp.

◆ ValueType()

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

Definition at line 57 of file alloca.hpp.

Member Data Documentation

◆ alignment_

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

Definition at line 122 of file alloca.hpp.

◆ AllocatedType_

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

Definition at line 123 of file alloca.hpp.


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