18 Name_(std::
move(name))
39 new GraphImport(graph, std::move(type), std::move(name)));
45 Name_(std::
move(name))
65 throw std::logic_error(
"Cannot create a GraphExport on a non-root region.");
82 auto graph = std::make_unique<Graph>();
87 auto &
importCopy =
import->Copy(graph->GetRootRegion(),
nullptr);
111 if (!input->region()->IsRootRegion())
124 for (
auto &
user : output.Users())
137 std::vector<Node *>
nodes;
146 if (IsOnlyExported(*output))
std::vector< rvsdg::Node * > nodes
std::string debug_string() const override
const std::string & Name() const noexcept
static GraphExport & Create(Output &origin, std::string name)
GraphExport & Copy(Output &origin, StructuralOutput *output) const override
GraphExport(Output &origin, std::string name)
GraphImport & Copy(Region ®ion, StructuralInput *input) const override
static GraphImport & Create(Graph &graph, std::shared_ptr< const rvsdg::Type > type, std::string name)
std::string debug_string() const override
const std::string & Name() const noexcept
GraphImport(Graph &graph, std::shared_ptr< const rvsdg::Type > type, std::string name)
static std::vector< Node * > ExtractTailNodes(const Graph &rvsdg)
Region & GetRootRegion() const noexcept
std::unique_ptr< Graph > Copy() const
rvsdg::Region * region() const noexcept
Represents the argument of a region.
Represents the result of a region.
StructuralOutput * output() const noexcept
Represent acyclic RVSDG subgraphs.
RegionArgument & addArgument(std::unique_ptr< RegionArgument > argument)
RegionArgumentRange Arguments() noexcept
void copy(Region *target, SubstitutionMap &smap) const
Copy a region with substitutions.
Graph * graph() const noexcept
RegionResult * result(size_t index) const noexcept
bool IsRootRegion() const noexcept
RegionResultRange Results() noexcept
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
static std::string strfmt(Args... args)