Jlm
HlsDotWriter.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2025 Nico Reißmann <nico.reissmann@gmail.com>
3  * See COPYING for terms of redistribution.
4  */
5 
7 #include <jlm/hls/ir/hls.hpp>
8 
9 namespace jlm::hls
10 {
11 
12 HlsDotWriter::~HlsDotWriter() noexcept = default;
13 
14 void
15 HlsDotWriter::AnnotateTypeGraphNode(const rvsdg::Type & type, util::graph::Node & node)
16 {
17  auto & typeGraph = node.GetGraph();
18 
19  if (const auto bundleType = dynamic_cast<const BundleType *>(&type))
20  {
21  for (auto [_, elementType] : bundleType->elements_)
22  {
23  auto & elementTypeNode = GetOrCreateTypeGraphNode(*elementType, typeGraph);
24  typeGraph.CreateDirectedEdge(elementTypeNode, node);
25  }
26  }
27  else
28  {
30  }
31 }
32 
33 }
~HlsDotWriter() noexcept override
void AnnotateTypeGraphNode(const rvsdg::Type &type, util::graph::Node &node) override
Definition: DotWriter.cpp:21
static std::string type(const Node *n)
Definition: view.cpp:255