Jlm
Public Member Functions | Private Attributes | List of all members
jlm::rvsdg::LambdaBuilder Class Reference

Constructs a lambda node. More...

#include <lambda.hpp>

Collaboration diagram for jlm::rvsdg::LambdaBuilder:
Collaboration graph
[legend]

Public Member Functions

 LambdaBuilder (Region &region, std::vector< std::shared_ptr< const Type >> argtypes)
 Creates builder for a lambda construct. More...
 
std::vector< Output * > Arguments ()
 Obtains definition points of parameters to the function. More...
 
rvsdg::RegionGetRegion () noexcept
 Returns region to place nodes in. More...
 
LambdaNode::ContextVar AddContextVar (jlm::rvsdg::Output &origin)
 Adds a context/free variable to the lambda node. More...
 
OutputFinalize (const std::vector< jlm::rvsdg::Output * > &results, std::unique_ptr< LambdaOperation > op)
 Verifies well-formedness of lambda node and completes it. More...
 

Private Attributes

LambdaNodeNode_
 

Detailed Description

Constructs a lambda node.

Definition at line 321 of file lambda.hpp.

Constructor & Destructor Documentation

◆ LambdaBuilder()

jlm::rvsdg::LambdaBuilder::LambdaBuilder ( Region region,
std::vector< std::shared_ptr< const Type >>  argtypes 
)

Creates builder for a lambda construct.

All methods of this builder can be used to incrementally construct the object until the Finalize method is called.

Definition at line 227 of file lambda.cpp.

Member Function Documentation

◆ AddContextVar()

LambdaNode::ContextVar jlm::rvsdg::LambdaBuilder::AddContextVar ( jlm::rvsdg::Output origin)

Adds a context/free variable to the lambda node.

Parameters
originThe value to be bound into the lambda node.
Precondition
this must not have been finalized yet.
Returns
The context variable argument of the lambda abstraction.

Definition at line 253 of file lambda.cpp.

◆ Arguments()

std::vector< Output * > jlm::rvsdg::LambdaBuilder::Arguments ( )

Obtains definition points of parameters to the function.

Returns
Region arguments that represent formal parameters of the function.
Precondition
this must not have been finalized yet.

Definition at line 239 of file lambda.cpp.

◆ Finalize()

Output & jlm::rvsdg::LambdaBuilder::Finalize ( const std::vector< jlm::rvsdg::Output * > &  results,
std::unique_ptr< LambdaOperation op 
)

Verifies well-formedness of lambda node and completes it.

Parameters
resultsThe result values to be returned by the lambda node.
opThe operations struct for this lambda, including the formal type signature of the function.
Precondition
this must not have been finalized yet.
Returns
The output representing the bound lambda object.

Definition at line 260 of file lambda.cpp.

◆ GetRegion()

rvsdg::Region * jlm::rvsdg::LambdaBuilder::GetRegion ( )
noexcept

Returns region to place nodes in.

Returns
The region
Precondition
this must not have been finalized yet.

Definition at line 246 of file lambda.cpp.

Member Data Documentation

◆ Node_

LambdaNode* jlm::rvsdg::LambdaBuilder::Node_
private

Definition at line 393 of file lambda.hpp.


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