Jlm
view.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2010 2011 2012 Helge Bahmann <hcb@chaoticmind.net>
3  * Copyright 2014 2015 Nico Reißmann <nico.reissmann@gmail.com>
4  * See COPYING for terms of redistribution.
5  */
6 
7 #ifndef JLM_RVSDG_VIEW_HPP
8 #define JLM_RVSDG_VIEW_HPP
9 
10 #include <jlm/rvsdg/graph.hpp>
11 
12 #include <string>
13 #include <unordered_map>
14 
15 namespace jlm::rvsdg
16 {
17 
18 class Region;
19 
28 std::string
29 view(const rvsdg::Region * region);
30 
38 std::string
39 view(const rvsdg::Region * region, std::unordered_map<const Output *, std::string> & map);
40 
46 void
47 view(const rvsdg::Region * region, FILE * out);
48 
54 inline void
55 view(const Graph & graph, FILE * out)
56 {
57  return view(&graph.GetRootRegion(), out);
58 }
59 
60 std::string
61 to_xml(const rvsdg::Region * region);
62 
63 void
64 view_xml(const rvsdg::Region * region, FILE * out);
65 
66 }
67 
68 #endif
Region & GetRootRegion() const noexcept
Definition: graph.hpp:99
Represent acyclic RVSDG subgraphs.
Definition: region.hpp:213
std::string view(const rvsdg::Region *region)
Definition: view.cpp:142
std::string to_xml(const rvsdg::Region *region)
Definition: view.cpp:357
void view_xml(const rvsdg::Region *region, FILE *out)
Definition: view.cpp:369