44static inline std::string
124 +
" [shape=plaintext label=<\n"
125 " <TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n"
127 " <TD PORT=\"default\" BORDER=\"1\" CELLPADDING=\"1\"><FONT "
175 std::unordered_map<rvsdg::Output *, ViewColors> &
tailLabel,
178 auto color =
"black";
183 +
" [style=\"\", arrowhead=\"normal\", color=" +
color
184 +
", headlabel=<>, fontsize=15, labelangle=45, labeldistance=2.0, labelfontcolor=blue, "
190 +
" [style=\"\", arrowhead=\"normal\", color=" +
color
191 +
", headlabel=<>, fontsize=15, labelangle=45, labeldistance=2.0, labelfontcolor=blue, "
192 "constraint=false, tooltip=\""
200 auto color =
"black";
202 +
" [style=\"\", arrowhead=\"normal\", color=" +
color
203 +
", headlabel=<>, fontsize=10, labelangle=45, labeldistance=2.0, labelfontcolor=black, "
205 + output->
Type()->debug_string() +
"\"];\n";
211 if ((
'A' <=
c &&
c <=
'Z') || (
'a' <=
c &&
c <=
'z') || (
'0' <=
c &&
c <=
'9') ||
'_' ==
c)
221 std::unordered_map<rvsdg::Output *, ViewColors> &
outputColor,
222 std::unordered_map<rvsdg::Input *, ViewColors> &
inputColor,
223 std::unordered_map<rvsdg::Output *, ViewColors> &
tailLabel)
226 std::ostringstream
dot;
228 dot <<
"color=\"#ff8080\"\n";
229 dot <<
"penwidth=6\n";
231 dot <<
"labeljust=l\n";
274 std::unordered_map<rvsdg::Output *, ViewColors> &
outputColor,
275 std::unordered_map<rvsdg::Input *, ViewColors> &
inputColor)
277 auto SPACER =
" <TD WIDTH=\"10\"></TD>\n";
282 std::ostringstream
inputs;
292 <<
"\" BORDER=\"1\" CELLPADDING=\"1\" COLOR=\"" <<
color
293 <<
"\"><FONT POINT-SIZE=\"10\" COLOR=\"" <<
color <<
"\"> i" <<
i <<
"</FONT></TD>\n";
306 <<
"\" BORDER=\"1\" CELLPADDING=\"1\" COLOR=\"" <<
color
307 <<
"\"><FONT POINT-SIZE=\"10\" COLOR=\"" <<
color <<
"\"> o" <<
i <<
"</FONT></TD>\n";
310 std::string
color =
"black";
313 +
" [shape=plaintext label=<\n"
314 "<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n"
317 " <TD BORDER=\"0\">\n"
318 " <TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n"
320 " <TD WIDTH=\"20\"></TD>\n"
322 +
" <TD WIDTH=\"20\"></TD>\n"
328 " <TD BORDER=\"3\" STYLE=\"ROUNDED\" CELLPADDING=\"4\">"
329 +
opname +
"<BR/><FONT POINT-SIZE=\"10\">" + name
333 " <TD BORDER=\"0\">\n"
334 " <TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">\n"
336 " <TD WIDTH=\"20\"></TD>\n"
338 +
" <TD WIDTH=\"20\"></TD>\n"
352 std::unordered_map<rvsdg::Output *, ViewColors> &
outputColor,
353 std::unordered_map<rvsdg::Input *, ViewColors> &
inputColor,
354 std::unordered_map<rvsdg::Output *, ViewColors> &
tailLabel)
356 std::ostringstream
dot;
358 dot <<
"color=\"#80b3ff\"\n";
359 dot <<
"penwidth=6\n";
363 dot <<
"{rank=source; ";
386 for (
size_t i = 0;
i < node->ninputs(); ++
i)
393 dot <<
"{rank=sink; ";
426 std::unordered_map<rvsdg::Output *, ViewColors> &
outputColor,
427 std::unordered_map<rvsdg::Input *, ViewColors> &
inputColor,
428 std::unordered_map<rvsdg::Output *, ViewColors> &
tailLabel)
430 std::ostringstream
dot;
431 dot <<
"digraph G {\n";
441 std::unordered_map<rvsdg::Output *, ViewColors> &
outputColor,
442 std::unordered_map<rvsdg::Input *, ViewColors> &
inputColor,
443 std::unordered_map<rvsdg::Output *, ViewColors> &
tailLabel)
452 std::unordered_map<rvsdg::Output *, ViewColors>
outputColor;
453 std::unordered_map<rvsdg::Input *, ViewColors>
inputColor;
454 std::unordered_map<rvsdg::Output *, ViewColors>
tailLabel;
468 std::unordered_map<rvsdg::Output *, ViewColors>
outputColor,
469 std::unordered_map<rvsdg::Input *, ViewColors>
inputColor,
470 std::unordered_map<rvsdg::Output *, ViewColors>
tailLabel)
487 std::unordered_map<rvsdg::Output *, ViewColors>
outputColor,
488 std::unordered_map<rvsdg::Input *, ViewColors>
inputColor,
489 std::unordered_map<rvsdg::Output *, ViewColors>
tailLabel)
static jlm::util::StatisticsCollector statisticsCollector
size_t index() const noexcept
const std::shared_ptr< const rvsdg::Type > & Type() const noexcept
Represents the argument of a region.
Represents the result of a region.
StructuralOutput * output() const noexcept
Represent acyclic RVSDG subgraphs.
RegionArgument * argument(size_t index) const noexcept
size_t nresults() const noexcept
RegionResult * result(size_t index) const noexcept
size_t index() const noexcept
size_t narguments() const noexcept
File createOutputFile(std::string fileNameSuffix, bool includeCount=false)
#define JLM_UNREACHABLE(msg)
std::string GetDotName(rvsdg::Node *node)
ViewColors GetDefaultLabel(std::unordered_map< T *, ViewColors > &map, T *elem, ViewColors def=NONE)
std::string SymbolicEdge(rvsdg::Input *output, rvsdg::Output *input)
void DumpDot(llvm::LlvmRvsdgModule &rvsdgModule, const std::string &file_name)
std::string RegionToDot(rvsdg::Region *region, std::unordered_map< rvsdg::Output *, ViewColors > &outputColor, std::unordered_map< rvsdg::Input *, ViewColors > &inputColor, std::unordered_map< rvsdg::Output *, ViewColors > &tailLabel)
std::string ResultToDot(rvsdg::RegionResult *result, const ViewColors &color)
std::string PortToDot(const std::string &display_name, const std::string &dot_name, const ViewColors &color)
void DotToSvg(const std::string &file_name)
void ViewDot(rvsdg::Region *region, FILE *out, std::unordered_map< rvsdg::Output *, ViewColors > &outputColor, std::unordered_map< rvsdg::Input *, ViewColors > &inputColor, std::unordered_map< rvsdg::Output *, ViewColors > &tailLabel)
std::string Edge(jlm::rvsdg::Output *output, jlm::rvsdg::Input *input, std::unordered_map< rvsdg::Output *, ViewColors > &tailLabel, bool back_edge=false)
std::string StructuralOutputToDot(rvsdg::StructuralOutput *structuralOutput, const ViewColors &color)
ViewColors GetDefaultColor(std::unordered_map< T *, ViewColors > &map, T *elem, ViewColors def=BLACK)
std::string ToDot(rvsdg::Region *region, std::unordered_map< rvsdg::Output *, ViewColors > &outputColor, std::unordered_map< rvsdg::Input *, ViewColors > &inputColor, std::unordered_map< rvsdg::Output *, ViewColors > &tailLabel)
static std::string hex(size_t i)
std::string ArgumentToDot(rvsdg::RegionArgument *argument, const ViewColors &color)
std::string StructuralNodeToDot(rvsdg::StructuralNode *structuralNode, std::unordered_map< rvsdg::Output *, ViewColors > &outputColor, std::unordered_map< rvsdg::Input *, ViewColors > &inputColor, std::unordered_map< rvsdg::Output *, ViewColors > &tailLabel)
std::string StructuralInputToDot(rvsdg::StructuralInput *structuralInput, const ViewColors &color)
std::string ViewcolorToString(const ViewColors &color)
bool isForbiddenChar(char c)
std::string SimpleNodeToDot(rvsdg::SimpleNode *simpleNode, std::unordered_map< rvsdg::Output *, ViewColors > &outputColor, std::unordered_map< rvsdg::Input *, ViewColors > &inputColor)
static std::vector< jlm::rvsdg::Output * > outputs(const Node *node)
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
detail::TopDownTraverserGeneric< false > TopDownTraverser
Traverser for visiting every node in a region in a top down order.
static std::string strfmt(Args... args)