Jlm
Loading...
Searching...
No Matches
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
9namespace jlm::hls
10{
11
13
14void
15HlsDotWriter::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
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
Definition node.hpp:872