Jlm
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
jlm::rvsdg::TestStructuralNode Class Referencefinal

#include <TestNodes.hpp>

Inheritance diagram for jlm::rvsdg::TestStructuralNode:
Inheritance graph
[legend]
Collaboration diagram for jlm::rvsdg::TestStructuralNode:
Collaboration graph
[legend]

Classes

struct  InputVar
 A variable routed in a TestStructuralNode. More...
 
struct  OutputVar
 A variable routed out of a TestStructuralNode. More...
 

Public Member Functions

 ~TestStructuralNode () noexcept override
 
StructuralInputaddInputOnly (Output &origin)
 
InputVar addInputWithArguments (Output &origin)
 
void removeInputAndArguments (size_t index)
 
InputVar addArguments (const std::shared_ptr< const Type > &type)
 
StructuralOutputaddOutputOnly (std::shared_ptr< const Type > type)
 
OutputVar addOutputWithResults (const std::vector< Output * > &origins)
 
void removeOutputAndResults (size_t index)
 
OutputVar addResults (const std::vector< Output * > &origins)
 
InputVar mapInput (const Input &input) const
 
OutputVar mapOutput (const Output &output) const
 
const TestStructuralOperationGetOperation () const noexcept override
 
TestStructuralNodecopy (Region *region, SubstitutionMap &smap) const override
 Copy a node with substitutions. More...
 
- Public Member Functions inherited from jlm::rvsdg::StructuralNode
 ~StructuralNode () noexcept override
 
std::string DebugString () const override
 
size_t nsubregions () const noexcept
 
rvsdg::Regionsubregion (size_t index) const noexcept
 
SubregionIteratorRange Subregions ()
 
SubregionConstIteratorRange Subregions () const
 
StructuralInputinput (size_t index) const noexcept
 
StructuralOutputoutput (size_t index) const noexcept
 
- Public Member Functions inherited from jlm::rvsdg::Node
virtual ~Node ()
 
 Node (Region *region)
 
Id GetNodeId () const noexcept
 
size_t ninputs () const noexcept
 
NodeInputinput (size_t index) const noexcept
 
InputIteratorRange Inputs () noexcept
 
InputConstIteratorRange Inputs () const noexcept
 
size_t noutputs () const noexcept
 
NodeOutputoutput (size_t index) const noexcept
 
OutputIteratorRange Outputs () noexcept
 
OutputConstIteratorRange Outputs () const noexcept
 
bool IsDead () const noexcept
 Determines whether the node is dead. More...
 
std::size_t numSuccessors () const noexcept
 
size_t RemoveInputs (const util::HashSet< size_t > &indices)
 
size_t RemoveOutputs (const util::HashSet< size_t > &indices)
 
Graphgraph () const noexcept
 
rvsdg::Regionregion () const noexcept
 
virtual Nodecopy (rvsdg::Region *region, const std::vector< jlm::rvsdg::Output * > &operands) const
 

Static Public Member Functions

static TestStructuralNodecreate (Region *parent, const size_t numSubregions)
 

Private Member Functions

 TestStructuralNode (Region *parent, size_t numSubregions)
 

Additional Inherited Members

- Public Types inherited from jlm::rvsdg::Node
using Id = uint64_t
 
using InputIteratorRange = util::IteratorRange< Input::Iterator >
 
using InputConstIteratorRange = util::IteratorRange< Input::ConstIterator >
 
using OutputIteratorRange = util::IteratorRange< Output::Iterator >
 
using OutputConstIteratorRange = util::IteratorRange< Output::ConstIterator >
 
typedef util::IntrusiveListAccessor< Node, &Node::region_node_list_anchor_region_node_list_accessor
 
typedef util::IntrusiveListAccessor< Node, &Node::region_top_node_list_anchor_region_top_node_list_accessor
 
typedef util::IntrusiveListAccessor< Node, &Node::region_bottom_node_list_anchor_region_bottom_node_list_accessor
 
- Protected Member Functions inherited from jlm::rvsdg::StructuralNode
 StructuralNode (rvsdg::Region *region, size_t nsubregions)
 
StructuralInputaddInput (std::unique_ptr< StructuralInput > input, bool notifyRegion)
 
StructuralOutputaddOutput (std::unique_ptr< StructuralOutput > input)
 
- Protected Member Functions inherited from jlm::rvsdg::Node
NodeInputaddInput (std::unique_ptr< NodeInput > input, bool notifyRegion)
 
NodeOutputaddOutput (std::unique_ptr< NodeOutput > output)
 

Detailed Description

Definition at line 27 of file TestNodes.hpp.

Constructor & Destructor Documentation

◆ ~TestStructuralNode()

jlm::rvsdg::TestStructuralNode::~TestStructuralNode ( )
overridedefaultnoexcept

◆ TestStructuralNode()

jlm::rvsdg::TestStructuralNode::TestStructuralNode ( Region parent,
size_t  numSubregions 
)
inlineprivate

Definition at line 33 of file TestNodes.hpp.

Member Function Documentation

◆ addArguments()

TestStructuralNode::InputVar jlm::rvsdg::TestStructuralNode::addArguments ( const std::shared_ptr< const Type > &  type)

Add subregion arguments WITHOUT an input to a TestStructuralNode.

Parameters
typeThe argument type
Returns
Description of input variable.

Definition at line 195 of file TestNodes.cpp.

◆ addInputOnly()

StructuralInput & jlm::rvsdg::TestStructuralNode::addInputOnly ( Output origin)

Add an input WITHOUT subregion arguments to a TestStructuralNode.

Parameters
originValue to be routed in.
Returns
The created input variable.

Definition at line 208 of file TestNodes.cpp.

◆ addInputWithArguments()

TestStructuralNode::InputVar jlm::rvsdg::TestStructuralNode::addInputWithArguments ( Output origin)

Add an input WITH subregion arguments to a TestStructuralNode.

Parameters
originValue to be routed in.
Returns
Description of input variable.

Definition at line 163 of file TestNodes.cpp.

◆ addOutputOnly()

StructuralOutput & jlm::rvsdg::TestStructuralNode::addOutputOnly ( std::shared_ptr< const Type type)

Add an output WITHOUT subregion results to a TestStructuralNode.

Parameters
typeThe output type
Returns
The created output variable.

Definition at line 214 of file TestNodes.cpp.

◆ addOutputWithResults()

TestStructuralNode::OutputVar jlm::rvsdg::TestStructuralNode::addOutputWithResults ( const std::vector< Output * > &  origins)

Add an output WITH subregion results to a TestStructuralNode.

Parameters
originsThe values to be routed out.
Returns
Description of output variable.

Definition at line 220 of file TestNodes.cpp.

◆ addResults()

TestStructuralNode::OutputVar jlm::rvsdg::TestStructuralNode::addResults ( const std::vector< Output * > &  origins)

Add subregion results WITHOUT output to a TestStructuralNode.

Parameters
originsThe values to be routed out.
Returns
Description of output variable.

Definition at line 257 of file TestNodes.cpp.

◆ copy()

TestStructuralNode * jlm::rvsdg::TestStructuralNode::copy ( Region region,
SubstitutionMap smap 
) const
overridevirtual

Copy a node with substitutions.

Parameters
regionTarget region to create node in
smapOperand substitutions
Returns
Copied node

Create a new node that is semantically equivalent to an existing node. The newly created node will use the same operands as the existing node unless there is a substitution registered for a particular operand.

The given substitution map is updated so that all outputs of the original node will be substituted by corresponding outputs of the newly created node in subsequent copy operations.

Implements jlm::rvsdg::Node.

Definition at line 36 of file TestNodes.cpp.

◆ create()

static TestStructuralNode* jlm::rvsdg::TestStructuralNode::create ( Region parent,
const size_t  numSubregions 
)
inlinestatic

Definition at line 152 of file TestNodes.hpp.

◆ GetOperation()

const TestStructuralOperation & jlm::rvsdg::TestStructuralNode::GetOperation ( ) const
overridevirtualnoexcept

Implements jlm::rvsdg::Node.

Definition at line 29 of file TestNodes.cpp.

◆ mapInput()

TestStructuralNode::InputVar jlm::rvsdg::TestStructuralNode::mapInput ( const Input input) const

Maps input to an InputVar

Parameters
inputInput to be mapped
Returns
The variable description corresponding to this input.
Precondition
input must be an input of this node.

Definition at line 119 of file TestNodes.cpp.

◆ mapOutput()

TestStructuralNode::OutputVar jlm::rvsdg::TestStructuralNode::mapOutput ( const Output output) const

Maps output to an OutputVar

Parameters
outputOutput to be mapped
Returns
The variable description corresponding to this output.
Precondition
output must be an output of this node.

Definition at line 141 of file TestNodes.cpp.

◆ removeInputAndArguments()

void jlm::rvsdg::TestStructuralNode::removeInputAndArguments ( size_t  index)

Removes the input with the given index, and any subregion arguments associated with it. All such arguments must be dead.

Parameters
indexthe index of the input to remove.

Definition at line 180 of file TestNodes.cpp.

◆ removeOutputAndResults()

void jlm::rvsdg::TestStructuralNode::removeOutputAndResults ( size_t  index)

Removes the output with the given index, and any subregion results associated with it.

Parameters
indexthe index of the output to remove.

Definition at line 242 of file TestNodes.cpp.


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