6 #ifndef JLM_RVSDG_STRUCTURAL_NODE_HPP
7 #define JLM_RVSDG_STRUCTURAL_NODE_HPP
19 class StructuralInput;
20 class StructuralOperation;
21 class StructuralOutput;
70 input(
size_t index)
const noexcept;
73 output(
size_t index)
const noexcept;
77 addInput(std::unique_ptr<StructuralInput>
input,
bool notifyRegion);
101 std::shared_ptr<const rvsdg::
Type>
type);
161 template<
class Operation>
169 if (is<Operation>(simpleNode->GetOperation()))
175 if (!checkSubregions)
182 for (
size_t n = 0; n < structuralNode->nsubregions(); n++)
184 if (ContainsOperation<Operation>(*structuralNode->subregion(n), checkSubregions))
195 template<
class NodeType>
201 if (
dynamic_cast<const NodeType *
>(&
node))
206 if (!checkSubregions)
213 for (
size_t n = 0; n < structuralNode->nsubregions(); n++)
215 if (ContainsNodeType<NodeType>(*structuralNode->subregion(n), checkSubregions))
Node * node() const noexcept
NodeOutput * addOutput(std::unique_ptr< NodeOutput > output)
rvsdg::Region * region() const noexcept
NodeInput * input(size_t index) const noexcept
NodeOutput * output(size_t index) const noexcept
NodeInput * addInput(std::unique_ptr< NodeInput > input, bool notifyRegion)
Represent acyclic RVSDG subgraphs.
static bool ContainsOperation(const rvsdg::Region ®ion, bool checkSubregions)
rvsdg::StructuralNode * node() const noexcept
static bool ContainsNodeType(const rvsdg::Region ®ion, bool checkSubregions)
NodeRange Nodes() noexcept
SubregionConstIteratorRange Subregions() const
util::PtrIterator< const Region, std::vector< std::unique_ptr< Region > >::const_iterator > SubregionConstIterator
std::string DebugString() const override
~StructuralNode() noexcept override
StructuralInput * addInput(std::unique_ptr< StructuralInput > input, bool notifyRegion)
StructuralOutput * addOutput(std::unique_ptr< StructuralOutput > input)
SubregionIteratorRange Subregions()
util::IteratorRange< SubregionIterator > SubregionIteratorRange
std::vector< std::unique_ptr< rvsdg::Region > > subregions_
util::PtrIterator< Region, std::vector< std::unique_ptr< Region > >::iterator > SubregionIterator
size_t nsubregions() const noexcept
StructuralOutput * output(size_t index) const noexcept
StructuralInput * input(size_t index) const noexcept
rvsdg::Region * subregion(size_t index) const noexcept
util::IteratorRange< SubregionConstIterator > SubregionConstIteratorRange
~StructuralOutput() noexcept override
StructuralNode * node() const noexcept
jlm::util::IntrusiveList< RegionResult, RegionResult::structural_output_accessor > result_list
jlm::util::IntrusiveList< RegionArgument, RegionArgument::structural_input_accessor > argument_list
static std::string type(const Node *n)