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, CallingConvention callingConvention, AttributeList attributes)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
const std::shared_ptr< const rvsdg::FunctionType > & GetFunctionType () const noexcept
 
CallingConvention getCallingConvention () const noexcept
 
const AttributeListgetAttributes () 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, CallingConvention callingConvention, AttributeList attributes, 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::Output *function, std::shared_ptr< const rvsdg::FunctionType > functionType, CallingConvention callingConvention, AttributeList attributes, const std::vector< rvsdg::Output * > &arguments)
 
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 rvsdg::SimpleNodeCreateNode (rvsdg::Output *function, std::shared_ptr< const rvsdg::FunctionType > functionType, CallingConvention callingConvention, AttributeList attributes, 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_
 
CallingConvention callingConvention_
 
AttributeList attributes_
 

Detailed Description

Call operation class.

Definition at line 250 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,
CallingConvention  callingConvention,
AttributeList  attributes 
)
inlineexplicit

Definition at line 255 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 310 of file call.hpp.

◆ CheckFunctionInputType()

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

Definition at line 550 of file call.hpp.

◆ CheckFunctionType()

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

Definition at line 557 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 49 of file call.cpp.

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 35 of file call.cpp.

◆ create()

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

Definition at line 445 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,
CallingConvention  callingConvention,
AttributeList  attributes,
const std::vector< rvsdg::Output * > &  arguments 
)
inlinestatic

Definition at line 473 of file call.hpp.

◆ Create() [2/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 464 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 540 of file call.hpp.

◆ CreateNode() [1/3]

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

Definition at line 519 of file call.hpp.

◆ CreateNode() [2/3]

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

Helper function for creating a call node calling the given function, with the given functionType, and the given arguments. The call gets the default calling convention and an empty attribute list.

Definition at line 505 of file call.hpp.

◆ CreateNode() [3/3]

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 489 of file call.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 29 of file call.cpp.

◆ getAttributes()

const AttributeList& jlm::llvm::CallOperation::getAttributes ( ) const
inlinenoexcept

Definition at line 284 of file call.hpp.

◆ getCallingConvention()

CallingConvention jlm::llvm::CallOperation::getCallingConvention ( ) const
inlinenoexcept

Definition at line 278 of file call.hpp.

◆ GetFunctionInput()

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

Definition at line 321 of file call.hpp.

◆ GetFunctionType()

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

Definition at line 272 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 333 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 345 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 357 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 369 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 298 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 41 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 388 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 406 of file call.hpp.

Member Data Documentation

◆ attributes_

AttributeList jlm::llvm::CallOperation::attributes_
private

Definition at line 595 of file call.hpp.

◆ callingConvention_

CallingConvention jlm::llvm::CallOperation::callingConvention_
private

Definition at line 594 of file call.hpp.

◆ FunctionType_

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

Definition at line 593 of file call.hpp.


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