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

Call operation class. More...

#include <call.hpp>

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

Public Member Functions

 ~CallOperation () override
 
 CallOperation (std::shared_ptr< const rvsdg::FunctionType > functionType)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
const std::shared_ptr< const rvsdg::FunctionType > & GetFunctionType () const noexcept
 
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 size_t NumArguments (const rvsdg::Node &node) noexcept
 
static rvsdg::InputArgument (const rvsdg::Node &node, const size_t n)
 
static rvsdg::InputGetFunctionInput (const rvsdg::Node &node) noexcept
 
static rvsdg::InputGetIOStateInput (const rvsdg::Node &node) noexcept
 
static rvsdg::OutputGetIOStateOutput (const rvsdg::Node &node) noexcept
 
static rvsdg::InputGetMemoryStateInput (const rvsdg::Node &node) noexcept
 
static rvsdg::OutputGetMemoryStateOutput (const rvsdg::Node &node) noexcept
 
static rvsdg::SimpleNodetryGetMemoryStateEntryMerge (const rvsdg::Node &callNode) noexcept
 
static rvsdg::SimpleNodetryGetMemoryStateExitSplit (const rvsdg::Node &callNode) noexcept
 
static rvsdg::OutputTraceFunctionInput (const rvsdg::SimpleNode &callNode)
 Traces function input of call node. More...
 
static std::unique_ptr< CallTypeClassifierClassifyCall (const rvsdg::SimpleNode &callNode)
 Classifies a call node. More...
 
static std::unique_ptr< ThreeAddressCodecreate (const Variable *function, std::shared_ptr< const rvsdg::FunctionType > functionType, const std::vector< const Variable * > &arguments)
 
static std::vector< rvsdg::Output * > Create (rvsdg::Output *function, std::shared_ptr< const rvsdg::FunctionType > functionType, const std::vector< rvsdg::Output * > &arguments)
 
static std::vector< rvsdg::Output * > Create (rvsdg::Region &region, std::unique_ptr< CallOperation > callOperation, const std::vector< rvsdg::Output * > &operands)
 
static rvsdg::SimpleNodeCreateNode (rvsdg::Region &region, std::unique_ptr< CallOperation > callOperation, const std::vector< rvsdg::Output * > &operands)
 
static rvsdg::SimpleNodeCreateNode (rvsdg::Output *function, std::shared_ptr< const rvsdg::FunctionType > functionType, const std::vector< rvsdg::Output * > &arguments)
 

Static Private Member Functions

static std::vector< std::shared_ptr< const rvsdg::Type > > create_srctypes (const std::shared_ptr< const rvsdg::FunctionType > &functionType)
 
static void CheckFunctionInputType (const jlm::rvsdg::Type &type)
 
static void CheckFunctionType (const rvsdg::FunctionType &functionType)
 

Private Attributes

std::shared_ptr< const rvsdg::FunctionTypeFunctionType_
 

Detailed Description

Call operation class.

Definition at line 248 of file call.hpp.

Constructor & Destructor Documentation

◆ ~CallOperation()

jlm::llvm::CallOperation::~CallOperation ( )
overridedefault

◆ CallOperation()

jlm::llvm::CallOperation::CallOperation ( std::shared_ptr< const rvsdg::FunctionType functionType)
inlineexplicit

Definition at line 253 of file call.hpp.

Member Function Documentation

◆ Argument()

static rvsdg::Input* jlm::llvm::CallOperation::Argument ( const rvsdg::Node node,
const size_t  n 
)
inlinestatic
Parameters
nodeThe call node
nThe index of the function argument.
Returns
The input for the given index n.

Definition at line 291 of file call.hpp.

◆ CheckFunctionInputType()

static void jlm::llvm::CallOperation::CheckFunctionInputType ( const jlm::rvsdg::Type type)
inlinestaticprivate

Definition at line 495 of file call.hpp.

◆ CheckFunctionType()

static void jlm::llvm::CallOperation::CheckFunctionType ( const rvsdg::FunctionType functionType)
inlinestaticprivate

Definition at line 502 of file call.hpp.

◆ ClassifyCall()

std::unique_ptr< CallTypeClassifier > jlm::llvm::CallOperation::ClassifyCall ( const rvsdg::SimpleNode callNode)
static

Classifies a call node.

Classifies a call node according to its call type.

Parameters
callNodeA call node.
Returns
A CallTypeClassifier.

Definition at line 47 of file call.cpp.

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 33 of file call.cpp.

◆ create()

static std::unique_ptr<ThreeAddressCode> jlm::llvm::CallOperation::create ( const Variable function,
std::shared_ptr< const rvsdg::FunctionType functionType,
const std::vector< const Variable * > &  arguments 
)
inlinestatic

Definition at line 426 of file call.hpp.

◆ Create() [1/2]

static std::vector<rvsdg::Output *> jlm::llvm::CallOperation::Create ( rvsdg::Output function,
std::shared_ptr< const rvsdg::FunctionType functionType,
const std::vector< rvsdg::Output * > &  arguments 
)
inlinestatic

Definition at line 440 of file call.hpp.

◆ Create() [2/2]

static std::vector<rvsdg::Output *> jlm::llvm::CallOperation::Create ( rvsdg::Region region,
std::unique_ptr< CallOperation callOperation,
const std::vector< rvsdg::Output * > &  operands 
)
inlinestatic

Definition at line 449 of file call.hpp.

◆ create_srctypes()

static std::vector<std::shared_ptr<const rvsdg::Type> > jlm::llvm::CallOperation::create_srctypes ( const std::shared_ptr< const rvsdg::FunctionType > &  functionType)
inlinestaticprivate

Definition at line 485 of file call.hpp.

◆ CreateNode() [1/2]

static rvsdg::SimpleNode& jlm::llvm::CallOperation::CreateNode ( rvsdg::Output function,
std::shared_ptr< const rvsdg::FunctionType functionType,
const std::vector< rvsdg::Output * > &  arguments 
)
inlinestatic

Definition at line 469 of file call.hpp.

◆ CreateNode() [2/2]

static rvsdg::SimpleNode& jlm::llvm::CallOperation::CreateNode ( rvsdg::Region region,
std::unique_ptr< CallOperation callOperation,
const std::vector< rvsdg::Output * > &  operands 
)
inlinestatic

Definition at line 458 of file call.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 27 of file call.cpp.

◆ GetFunctionInput()

static rvsdg::Input& jlm::llvm::CallOperation::GetFunctionInput ( const rvsdg::Node node)
inlinestaticnoexcept
Returns
The call node's function input.

Definition at line 302 of file call.hpp.

◆ GetFunctionType()

const std::shared_ptr<const rvsdg::FunctionType>& jlm::llvm::CallOperation::GetFunctionType ( ) const
inlinenoexcept

Definition at line 265 of file call.hpp.

◆ GetIOStateInput()

static rvsdg::Input& jlm::llvm::CallOperation::GetIOStateInput ( const rvsdg::Node node)
inlinestaticnoexcept
Returns
The call node's input/output state input.

Definition at line 314 of file call.hpp.

◆ GetIOStateOutput()

static rvsdg::Output& jlm::llvm::CallOperation::GetIOStateOutput ( const rvsdg::Node node)
inlinestaticnoexcept
Returns
The call node's input/output state output.

Definition at line 326 of file call.hpp.

◆ GetMemoryStateInput()

static rvsdg::Input& jlm::llvm::CallOperation::GetMemoryStateInput ( const rvsdg::Node node)
inlinestaticnoexcept
Returns
The call node's memory state input.

Definition at line 338 of file call.hpp.

◆ GetMemoryStateOutput()

static rvsdg::Output& jlm::llvm::CallOperation::GetMemoryStateOutput ( const rvsdg::Node node)
inlinestaticnoexcept
Returns
The call node's memory state output.

Definition at line 350 of file call.hpp.

◆ NumArguments()

static size_t jlm::llvm::CallOperation::NumArguments ( const rvsdg::Node node)
inlinestaticnoexcept
Returns
The number of arguments to the call.
Note
This is equivalent to ninputs() - 1 as NumArguments() ignores the function input.

Definition at line 279 of file call.hpp.

◆ operator==()

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

Definition at line 20 of file call.cpp.

◆ TraceFunctionInput()

rvsdg::Output & jlm::llvm::CallOperation::TraceFunctionInput ( const rvsdg::SimpleNode callNode)
static

Traces function input of call node.

Traces the function input of a call node upwards, trying to find the corresponding lambda output. The function can handle invariant gamma exit variables and invariant theta loop variables.

Parameters
callNodeA call node.
Returns
The traced output.

Definition at line 39 of file call.cpp.

◆ tryGetMemoryStateEntryMerge()

static rvsdg::SimpleNode* jlm::llvm::CallOperation::tryGetMemoryStateEntryMerge ( const rvsdg::Node callNode)
inlinestaticnoexcept
Parameters
callNodeThe call node for which to retrieve the CallEntryMemoryStateMergeOperation node.
Returns
The CallEntryMemoryStateMergeOperation node connected to the memory state input if present, otherwise nullptr.
See also
GetMemoryStateInput()
GetMemoryStateExitSplit()

Definition at line 369 of file call.hpp.

◆ tryGetMemoryStateExitSplit()

static rvsdg::SimpleNode* jlm::llvm::CallOperation::tryGetMemoryStateExitSplit ( const rvsdg::Node callNode)
inlinestaticnoexcept
Parameters
callNodeThe call node for which to retrieve the CallExitMemoryStateSplitOperation node.
Returns
The CallExitMemoryStateSplitOperation node connected to the memory state output if present, otherwise nullptr.
See also
GetMemoryStateOutput()
GetMemoryStateEntryMerge()

Definition at line 387 of file call.hpp.

Member Data Documentation

◆ FunctionType_

std::shared_ptr<const rvsdg::FunctionType> jlm::llvm::CallOperation::FunctionType_
private

Definition at line 538 of file call.hpp.


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