Jlm
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
jlm::llvm::FunctionToPointerOperation Class Referencefinal

Get address of compiled function object. More...

#include <ConversionOperations.hpp>

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

Public Member Functions

 ~FunctionToPointerOperation () noexcept override
 
 FunctionToPointerOperation (std::shared_ptr< const rvsdg::FunctionType > fn)
 
bool operator== (const Operation &other) const noexcept override
 
std::string debug_string () const override
 
std::unique_ptr< Operation > copy () const override
 
const std::shared_ptr< const rvsdg::FunctionType > & FunctionType () const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::UnaryOperation
 ~UnaryOperation () noexcept override
 
 UnaryOperation (std::shared_ptr< const Type > operand, std::shared_ptr< const Type > result)
 
- 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::unique_ptr< FunctionToPointerOperation > Create (std::shared_ptr< const rvsdg::FunctionType > fn)
 
static rvsdg::SimpleNode & createNode (rvsdg::Output &operand)
 
static std::optional< std::vector< rvsdg::Output * > > invertFunctionToPointer (const FunctionToPointerOperation &operation, const std::vector< rvsdg::Output * > &operands)
 

Private Attributes

std::shared_ptr< const rvsdg::FunctionType > FunctionType_
 

Detailed Description

Get address of compiled function object.

Definition at line 905 of file ConversionOperations.hpp.

Constructor & Destructor Documentation

◆ ~FunctionToPointerOperation()

jlm::llvm::FunctionToPointerOperation::~FunctionToPointerOperation ( )
overridenoexcept

Definition at line 433 of file ConversionOperations.cpp.

◆ FunctionToPointerOperation()

jlm::llvm::FunctionToPointerOperation::FunctionToPointerOperation ( std::shared_ptr< const rvsdg::FunctionType >  fn)
explicit

Definition at line 436 of file ConversionOperations.cpp.

Member Function Documentation

◆ copy()

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

Implements jlm::rvsdg::Operation.

Definition at line 462 of file ConversionOperations.cpp.

◆ Create()

std::unique_ptr< FunctionToPointerOperation > jlm::llvm::FunctionToPointerOperation::Create ( std::shared_ptr< const rvsdg::FunctionType >  fn)
static

Definition at line 468 of file ConversionOperations.cpp.

◆ createNode()

static rvsdg::SimpleNode & jlm::llvm::FunctionToPointerOperation::createNode ( rvsdg::Output &  operand)
inlinestatic

Definition at line 931 of file ConversionOperations.hpp.

◆ debug_string()

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

Implements jlm::rvsdg::Operation.

Definition at line 456 of file ConversionOperations.cpp.

◆ FunctionType()

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

Definition at line 925 of file ConversionOperations.hpp.

◆ invertFunctionToPointer()

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

Performs the inversion of the FunctionToPointerOperation by detecting that its operand is a PointerToFunctionOperation.

f = PointerToFunctionOperation x p = FunctionToPointerOperation f => p = x

Parameters
operationThe FunctionToPointerOperation on which the transformation is performed.
operandsThe operands of the FunctionToPointerOperation node.
Returns
If the normalization could be applied, then the result of the FunctionToPointerOperation after the transformation. Otherwise, std::nullopt.

Definition at line 474 of file ConversionOperations.cpp.

◆ operator==()

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

Definition at line 443 of file ConversionOperations.cpp.

Member Data Documentation

◆ FunctionType_

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

Definition at line 963 of file ConversionOperations.hpp.


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