Jlm
Public Member Functions | Static Public Member Functions | List of all members
jlm::llvm::MemoryStateMergeOperation Class Referencefinal

#include <MemoryStateOperations.hpp>

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

Public Member Functions

 ~MemoryStateMergeOperation () noexcept override
 
 MemoryStateMergeOperation (size_t numOperands)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
- 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 std::optional< std::vector< rvsdg::Output * > > NormalizeSingleOperand (const MemoryStateMergeOperation &operation, const std::vector< rvsdg::Output * > &operands)
 Removes the MemoryStateMergeOperation as it has only a single operand, i.e., no merging is performed. More...
 
static std::optional< std::vector< rvsdg::Output * > > NormalizeDuplicateOperands (const MemoryStateMergeOperation &operation, const std::vector< rvsdg::Output * > &operands)
 Removes duplicated operands from the MemoryStateMergeOperation. More...
 
static std::optional< std::vector< rvsdg::Output * > > NormalizeNestedMerges (const MemoryStateMergeOperation &operation, const std::vector< rvsdg::Output * > &operands)
 Fuses nested merges into a single merge. More...
 
static std::optional< std::vector< rvsdg::Output * > > NormalizeMergeSplit (const MemoryStateMergeOperation &operation, const std::vector< rvsdg::Output * > &operands)
 Fuses nested splits into a single merge. More...
 
static rvsdg::SimpleNodeCreateNode (const std::vector< rvsdg::Output * > &operands)
 
static rvsdg::OutputCreate (const std::vector< rvsdg::Output * > &operands)
 
static std::unique_ptr< ThreeAddressCodeCreate (const std::vector< const Variable * > &operands)
 

Additional Inherited Members

- Protected Member Functions inherited from jlm::llvm::MemoryStateOperation
 MemoryStateOperation (size_t numOperands, size_t numResults)
 

Detailed Description

A memory state merge operation takes multiple states as input and merges them together to a single output state.

The operation has no equivalent LLVM instruction.

Definition at line 38 of file MemoryStateOperations.hpp.

Constructor & Destructor Documentation

◆ ~MemoryStateMergeOperation()

jlm::llvm::MemoryStateMergeOperation::~MemoryStateMergeOperation ( )
overridedefaultnoexcept

◆ MemoryStateMergeOperation()

jlm::llvm::MemoryStateMergeOperation::MemoryStateMergeOperation ( size_t  numOperands)
inlineexplicit

Definition at line 43 of file MemoryStateOperations.hpp.

Member Function Documentation

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 32 of file MemoryStateOperations.cpp.

◆ Create() [1/2]

static std::unique_ptr<ThreeAddressCode> jlm::llvm::MemoryStateMergeOperation::Create ( const std::vector< const Variable * > &  operands)
inlinestatic

Definition at line 120 of file MemoryStateOperations.hpp.

◆ Create() [2/2]

static rvsdg::Output* jlm::llvm::MemoryStateMergeOperation::Create ( const std::vector< rvsdg::Output * > &  operands)
inlinestatic

Definition at line 114 of file MemoryStateOperations.hpp.

◆ CreateNode()

static rvsdg::SimpleNode& jlm::llvm::MemoryStateMergeOperation::CreateNode ( const std::vector< rvsdg::Output * > &  operands)
inlinestatic

Definition at line 108 of file MemoryStateOperations.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 26 of file MemoryStateOperations.cpp.

◆ NormalizeDuplicateOperands()

std::optional< std::vector< rvsdg::Output * > > jlm::llvm::MemoryStateMergeOperation::NormalizeDuplicateOperands ( const MemoryStateMergeOperation operation,
const std::vector< rvsdg::Output * > &  operands 
)
static

Removes duplicated operands from the MemoryStateMergeOperation.

so = MemoryStateMergeOperation si0 si0 si1 si1 si2 => so = MemoryStateMergeOperation si0 si1 si2

Definition at line 49 of file MemoryStateOperations.cpp.

◆ NormalizeMergeSplit()

std::optional< std::vector< rvsdg::Output * > > jlm::llvm::MemoryStateMergeOperation::NormalizeMergeSplit ( const MemoryStateMergeOperation operation,
const std::vector< rvsdg::Output * > &  operands 
)
static

Fuses nested splits into a single merge.

o1, o2, o3 = MemoryStateSplitOperation i1 o4 = MemoryStateMergeOperation i2 o1 o2 o3 i3 => o4 = MemoryStateMergeOperation i2 i1 i1 i1 i3

Definition at line 108 of file MemoryStateOperations.cpp.

◆ NormalizeNestedMerges()

std::optional< std::vector< rvsdg::Output * > > jlm::llvm::MemoryStateMergeOperation::NormalizeNestedMerges ( const MemoryStateMergeOperation operation,
const std::vector< rvsdg::Output * > &  operands 
)
static

Fuses nested merges into a single merge.

o1 = MemoryStateMergeOperation i1 i2 o2 = MemoryStateMergeOperation o1 i3 => o2 = MemoryStateMergeOperation i1 i2 i3

Definition at line 93 of file MemoryStateOperations.cpp.

◆ NormalizeSingleOperand()

std::optional< std::vector< rvsdg::Output * > > jlm::llvm::MemoryStateMergeOperation::NormalizeSingleOperand ( const MemoryStateMergeOperation operation,
const std::vector< rvsdg::Output * > &  operands 
)
static

Removes the MemoryStateMergeOperation as it has only a single operand, i.e., no merging is performed.

so = MemoryStateMergeOperation si ... = AnyOperation so => ... = AnyOperation si

Definition at line 38 of file MemoryStateOperations.cpp.

◆ operator==()

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

Definition at line 19 of file MemoryStateOperations.cpp.


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