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

#include <MemoryStateOperations.hpp>

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

Public Member Functions

 ~LambdaEntryMemoryStateSplitOperation () noexcept override
 
 LambdaEntryMemoryStateSplitOperation (const std::vector< MemoryNodeId > &memoryNodeIds)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
std::vector< MemoryNodeIdgetMemoryNodeIds () 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::OutputtryMapMemoryNodeIdToOutput (const rvsdg::SimpleNode &node, MemoryNodeId memoryNodeId)
 
static MemoryNodeId mapOutputToMemoryNodeId (const rvsdg::Output &output)
 
static std::optional< std::vector< rvsdg::Output * > > NormalizeCallEntryMemoryStateMerge (const LambdaEntryMemoryStateSplitOperation &lambdaEntrySplitOperation, const std::vector< rvsdg::Output * > &operands)
 
static rvsdg::SimpleNodeCreateNode (rvsdg::Output &operand, std::vector< MemoryNodeId > memoryNodeIds)
 

Private Attributes

util::BijectiveMap< MemoryNodeId, size_t > memoryNodeIdToIndexMap_ {}
 

Additional Inherited Members

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

Detailed Description

A lambda entry memory state split operation takes a single input state and splits it into multiple output states. In contrast to the MemoryStateSplitOperation, this operation is allowed to have zero output states. The operation's input is required to be connected to the memory state argument of a lambda.

The operation has no equivalent LLVM instruction.

See also
LambdaExitMemoryStateMergeOperation

Definition at line 288 of file MemoryStateOperations.hpp.

Constructor & Destructor Documentation

◆ ~LambdaEntryMemoryStateSplitOperation()

jlm::llvm::LambdaEntryMemoryStateSplitOperation::~LambdaEntryMemoryStateSplitOperation ( )
overridedefaultnoexcept

◆ LambdaEntryMemoryStateSplitOperation()

jlm::llvm::LambdaEntryMemoryStateSplitOperation::LambdaEntryMemoryStateSplitOperation ( const std::vector< MemoryNodeId > &  memoryNodeIds)
explicit

Definition at line 309 of file MemoryStateOperations.cpp.

Member Function Documentation

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 337 of file MemoryStateOperations.cpp.

◆ CreateNode()

static rvsdg::SimpleNode& jlm::llvm::LambdaEntryMemoryStateSplitOperation::CreateNode ( rvsdg::Output operand,
std::vector< MemoryNodeId memoryNodeIds 
)
inlinestatic

Definition at line 361 of file MemoryStateOperations.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 331 of file MemoryStateOperations.cpp.

◆ getMemoryNodeIds()

std::vector<MemoryNodeId> jlm::llvm::LambdaEntryMemoryStateSplitOperation::getMemoryNodeIds ( ) const
inlinenoexcept
Returns
The MemoryNodeId for each of the operation's results.

Definition at line 308 of file MemoryStateOperations.hpp.

◆ mapOutputToMemoryNodeId()

MemoryNodeId jlm::llvm::LambdaEntryMemoryStateSplitOperation::mapOutputToMemoryNodeId ( const rvsdg::Output output)
static

Maps the output a LambdaEntryMemoryStateSplitOperation node to the respective MemoryNodeId.

Parameters
outputA output of LambdaEntryMemoryStateSplitOperation node.
Returns
The MemoryNodeId.
Precondition
The output is assumed to belong to a LambdaEntryMemoryStateSplitOperation node.

Definition at line 364 of file MemoryStateOperations.cpp.

◆ NormalizeCallEntryMemoryStateMerge()

std::optional< std::vector< rvsdg::Output * > > jlm::llvm::LambdaEntryMemoryStateSplitOperation::NormalizeCallEntryMemoryStateMerge ( const LambdaEntryMemoryStateSplitOperation lambdaEntrySplitOperation,
const std::vector< rvsdg::Output * > &  operands 
)
static

Perform the following transformation:

oN = CallEntryMemoryStateMergeOperation o0 ... oK oX ... oZ = LambdaEntryMemoryStateSplitOperation oN ... = AnyOp oX ... oZ => ... = AnyOp o0 ... oK

This transformation can occur after function inlining, i.e., a CallOperation has been replaced with the body of its respective rvsdg::LambdaNode.

Definition at line 374 of file MemoryStateOperations.cpp.

◆ operator==()

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

Definition at line 323 of file MemoryStateOperations.cpp.

◆ tryMapMemoryNodeIdToOutput()

rvsdg::Output * jlm::llvm::LambdaEntryMemoryStateSplitOperation::tryMapMemoryNodeIdToOutput ( const rvsdg::SimpleNode node,
MemoryNodeId  memoryNodeId 
)
static

Maps a memory node identifier to the respective output of a LambdaEntryMemoryStateSplitOperation node.

Parameters
nodeA LambdaEntryMemoryStateSplitOperation node.
memoryNodeIdA memory node identifier.
Returns
The respective output if the memory node identifier maps to one, otherwise nullptr.

Definition at line 343 of file MemoryStateOperations.cpp.

Member Data Documentation

◆ memoryNodeIdToIndexMap_

util::BijectiveMap<MemoryNodeId, size_t> jlm::llvm::LambdaEntryMemoryStateSplitOperation::memoryNodeIdToIndexMap_ {}
private

Definition at line 369 of file MemoryStateOperations.hpp.


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