PandA-2024.02
behavioral_writer_helper.cpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
46 
47 #include "config_HAVE_HOST_PROFILING_BUILT.hpp"
48 
49 #include "custom_map.hpp" // for _Rb_tree_const_iterator
50 #include <list> // for list
51 #include <string> // for string, operator<<
52 #include <utility> // for pair
53 #if HAVE_HLS_BUILT
54 #include "allocation_information.hpp" // for AllocationInformation
55 #endif
56 #include "application_manager.hpp" // for application_manager
57 #include "basic_block.hpp" // for BBNodeInfoConstRef
58 #include "behavioral_helper.hpp" // for BehavioralHelper
59 #include "cdfg_edge_info.hpp" // for CDG_SELECTOR, CFG_SE...
60 #include "exceptions.hpp" // for THROW_UNREACHABLE
61 #include "function_behavior.hpp" // for tree_nodeRef, Functi...
62 #if HAVE_HLS_BUILT
63 #include "hls.hpp" // for hls, AllocationInfor...
64 #include "hls_manager.hpp" // for HLS_manager, hlsRef
65 #endif
66 #include "op_graph.hpp" // for OpEdgeInfo, OpGraph
67 #if HAVE_HOST_PROFILING_BUILT
68 #include "profiling_information.hpp" // for ProfilingInformation
69 #endif
70 #if HAVE_HLS_BUILT
71 #include "schedule.hpp" // for Schedule, AbsControl...
72 #endif
73 #include "string_manipulation.hpp" // for STR
74 #include "tree_basic_block.hpp" // for bloc, tree_nodeRef
75 #include "tree_common.hpp" // for aggr_init_expr_K
76 #include "tree_node.hpp" // for tree_node, CASE_BINA...
77 #include "tree_reindex.hpp"
78 #include "typed_node_info.hpp" // for GET_TYPE, GET_NAME
79 #include "var_pp_functor.hpp" // for std_var_pp_functor
80 
82  : VertexWriter(_g, 0),
83  function_behavior(_g->CGetBBGraphInfo()->AppM->CGetFunctionBehavior(_g->CGetBBGraphInfo()->function_index)),
84  helper(function_behavior->CGetBehavioralHelper()),
85  annotated(std::move(_annotated))
86 #if HAVE_HLS_BUILT
87  ,
88  schedule(
89  (GetPointer<const HLS_manager>(_g->CGetBBGraphInfo()->AppM) and
90  GetPointer<const HLS_manager>(_g->CGetBBGraphInfo()->AppM)->get_HLS(helper->get_function_index())) ?
91  GetPointer<const HLS_manager>(_g->CGetBBGraphInfo()->AppM)->get_HLS(helper->get_function_index())->Rsch :
93 #endif
94 {
95 }
96 
97 void BBWriter::operator()(std::ostream& out, const vertex& v) const
98 {
99  const BBGraphInfoConstRef info = dynamic_cast<const BBGraph*>(printing_graph)->CGetBBGraphInfo();
100  const BBNodeInfoConstRef bb_node_info = dynamic_cast<const BBGraph*>(printing_graph)->CGetBBNodeInfo(v);
101  if(v == info->entry_vertex)
102  {
103  out << "[color=blue,shape=Msquare, ";
104  if(annotated.find(v) != annotated.end())
105  {
106  out << " style=filled, fillcolor=black, fontcolor=white,";
107  }
108  out << "label=\"ENTRY";
109  }
110  else if(v == info->exit_vertex)
111  {
112  out << "[color=blue,shape=Msquare, ";
113  if(annotated.find(v) != annotated.end())
114  {
115  out << " style=filled, fillcolor=black, fontcolor=white,";
116  }
117  out << "label=\"EXIT";
118  }
119  else
120  {
121  out << "[shape=box";
122  if(annotated.find(v) != annotated.end())
123  {
124  out << ", style=filled, fillcolor=black, fontcolor=white";
125  }
126  if(bb_node_info and bb_node_info->block)
127  {
128  out << ", label=\"BB" << bb_node_info->block->number << " - GCCLI: " << bb_node_info->block->loop_id
129  << " - HPL: " << bb_node_info->block->hpl << " - Cer: " << bb_node_info->cer;
130  out << " - Loop " << bb_node_info->loop_id;
131 #if HAVE_HOST_PROFILING_BUILT
132  out << " - Executions: " << function_behavior->CGetProfilingInformation()->GetBBExecutions(v);
133 #endif
134  }
135  if(bb_node_info and bb_node_info->block->CGetPhiList().size() and helper)
136  {
137  out << "\\l";
138  for(const auto& phi : bb_node_info->block->CGetPhiList())
139  {
141  auto res = STR(phi->index);
142 #if HAVE_HLS_BUILT
143  if(schedule)
144  {
145  res += " " + schedule->PrintTimingInformation(phi->index) + " ";
146  }
147 #endif
148  res += " -> " + helper->PrintNode(phi, nullptr, svpf);
149  std::string temp;
150  for(char re : res)
151  {
152  if(re == '\"')
153  {
154  temp += "\\\"";
155  }
156  else if(re != '\n')
157  {
158  temp += re;
159  }
160  }
161  out << temp << "\\l";
162  }
163  }
164  if(bb_node_info and bb_node_info->block->CGetStmtList().size() and helper)
165  {
166  if(bb_node_info->block->CGetPhiList().empty())
167  {
168  out << "\\n";
169  }
170  for(const auto& statement : bb_node_info->block->CGetStmtList())
171  {
173  auto res = STR(GET_INDEX_NODE(statement));
174 #if HAVE_HLS_BUILT
175  if(schedule)
176  {
177  res += " " + schedule->PrintTimingInformation(statement->index) + " ";
178  }
179 #endif
180  res += " -> " + helper->PrintNode(statement, nullptr, svpf);
181  const tree_nodeRef node = GET_NODE(statement);
182  switch(node->get_kind())
183  {
184  case gimple_assign_K:
185  case gimple_call_K:
186  case gimple_asm_K:
187  case gimple_goto_K:
188  case gimple_predict_K:
189  case gimple_resx_K:
190  res += ";";
191  break;
192  case binfo_K:
193  case block_K:
194  case constructor_K:
195  case call_expr_K:
196  case aggr_init_expr_K:
197  case case_label_expr_K:
198  case gimple_bind_K:
199  case gimple_cond_K:
200  case gimple_for_K:
201  case gimple_label_K:
202  case gimple_multi_way_if_K:
203  case gimple_nop_K:
204  case gimple_phi_K:
205  case gimple_pragma_K:
206  case gimple_return_K:
207  case gimple_switch_K:
208  case gimple_while_K:
209  case identifier_node_K:
210  case ssa_name_K:
211  case statement_list_K:
212  case target_expr_K:
213  case target_mem_ref_K:
214  case target_mem_ref461_K:
215  case tree_list_K:
216  case tree_vec_K:
217  case error_mark_K:
218  case lut_expr_K:
220  case CASE_CPP_NODES:
221  case CASE_CST_NODES:
222  case CASE_DECL_NODES:
223  case CASE_FAKE_NODES:
224  case CASE_PRAGMA_NODES:
227  case CASE_TYPE_NODES:
229  default:
230  break;
231  }
232  std::string temp;
233  for(char re : res)
234  {
235  if(re == '\"')
236  {
237  temp += "\\\"";
238  }
239  else if(re != '\n')
240  {
241  temp += re;
242  }
243  }
244  out << temp << "\\l";
245  }
246  }
247  }
248  out << "\"]";
249 }
250 
251 OpEdgeWriter::OpEdgeWriter(const OpGraph* operation_graph)
252  : EdgeWriter(operation_graph, 0), BH(operation_graph->CGetOpGraphInfo()->BH)
253 {
254 }
255 
256 void OpEdgeWriter::operator()(std::ostream& out, const EdgeDescriptor& e) const
257 {
259  {
260  out << "[color=gold";
261  }
263  {
264  out << "[fontcolor=red3";
265  }
268  {
269  out << "[color=gold,style=dotted";
270  }
272  {
273  out << "[color=gold";
274  }
275  else if(((CDG_SELECTOR)&selector & printing_graph->GetSelector(e)) &&
277  {
278  out << "[color=red3,style=dotted";
279  }
281  {
282  out << "[color=red3";
283  }
285  {
286  out << "[color=lightblue";
287  }
289  {
290  out << "[color=blue, style=dotted";
291  }
293  {
294  out << "[color=blue";
295  }
297  {
298  out << "[color=lawngreen";
299  }
301  {
302  out << "[color=green4";
303  }
305  {
306  out << "[color=lawngreen";
307  }
309  {
310  out << "[color=green4";
311  }
313  {
314  out << "[color=red3";
315  }
317  {
318  out << "[color=blue";
319  }
321  {
322  out << "[color=gold";
323  }
325  {
326  out << "[color=lightblue";
327  }
329  {
330  out << "[color=red3";
331  }
333  {
334  out << "[color=red3";
335  }
338  {
339  out << "[color=pink,style=dotted";
340  }
342  {
343  out << "[color=pink";
344  }
346  {
347  out << "[color=pink";
348  }
349 
350  const auto* edge_info = Cget_edge_info<OpEdgeInfo>(e, *printing_graph);
351 
352  if(edge_info)
353  {
354  out << ",label=\"";
356  {
357  if(edge_info->CdgEdgeT() || edge_info->CdgEdgeF() || edge_info->Switch())
358  {
359  out << edge_info->PrintLabels(CDG_SELECTOR, BH);
360  }
361  }
363  {
364  if(edge_info->CfgEdgeT() || edge_info->CfgEdgeF() || edge_info->Switch())
365  {
366  out << edge_info->PrintLabels(CFG_SELECTOR, BH);
367  }
368  }
370  {
371  if(edge_info->FlgEdgeT() || edge_info->FlgEdgeF())
372  {
373  out << edge_info->PrintLabels(FLG_SELECTOR, BH);
374  }
375  }
377  {
378  out << edge_info->PrintLabels(DFG_SELECTOR, BH);
379  }
381  {
382  out << edge_info->PrintLabels(ADG_SELECTOR, BH);
383  }
385  {
386  out << edge_info->PrintLabels(ODG_SELECTOR, BH);
387  }
388  out << "\"";
389  }
390  out << "]";
391 }
392 
394  : EdgeWriter(_g, 0),
395  BH(_g->CGetBBGraphInfo()
396  ->AppM->CGetFunctionBehavior(_g->CGetBBGraphInfo()->function_index)
397  ->CGetBehavioralHelper())
398 {
399 }
400 
401 void BBEdgeWriter::operator()(std::ostream& out, const EdgeDescriptor& e) const
402 {
404  {
405  out << "[fontcolor=blue, color=gold";
406  }
408  {
409  out << "[fontcolor=blue, color=red3";
410  }
412  {
413  out << "[fontcolor=blue, color=red3";
414  }
415  else if(D_SELECTOR & printing_graph->GetSelector(e))
416  {
417  out << "[fontcolor=blue";
418  }
419  else if(PD_SELECTOR & printing_graph->GetSelector(e))
420  {
421  out << "[fontcolor=blue";
422  }
424  {
425  out << "[fontcolor=blue, color=gold";
426  }
427  else if(J_SELECTOR & printing_graph->GetSelector(e))
428  {
429  out << "[fontcolor=blue, color=gold";
430  }
431  else if(PP_SELECTOR & printing_graph->GetSelector(e))
432  {
433  out << "[fontcolor=blue, color=gold";
434  }
435  else
436  {
437  THROW_UNREACHABLE("Not supported graph type in printing: " + STR(printing_graph->GetSelector(e)) + " " +
438  STR(PP_SELECTOR));
439  }
440  const BBEdgeInfoConstRef bb_edge_info = dynamic_cast<const BBGraph*>(printing_graph)->CGetBBEdgeInfo(e);
441  if(selector & PP_SELECTOR)
442  {
443  out << ",label=\"";
444  out << std::to_string(bb_edge_info->get_epp_value());
445  out << "\"";
446  }
447  else if(selector & FCFG_SELECTOR)
448  {
449  if(bb_edge_info->CfgEdgeT() || bb_edge_info->CfgEdgeF() || bb_edge_info->Switch())
450  {
451  out << ",label=\"";
452  out << bb_edge_info->PrintLabels(CFG_SELECTOR, BH);
453  out << "\"";
454  }
455  }
456  else if(selector & FCDG_SELECTOR)
457  {
458  if(bb_edge_info->CdgEdgeT() || bb_edge_info->CdgEdgeF() || bb_edge_info->Switch())
459  {
460  out << ",label=\"";
461  out << bb_edge_info->PrintLabels(CDG_SELECTOR, BH);
462  out << "\"";
463  }
464  }
465  out << "]";
466 }
467 
468 OpWriter::OpWriter(const OpGraph* operation_graph, const int _detail_level)
469  : VertexWriter(operation_graph, _detail_level), helper(operation_graph->CGetOpGraphInfo()->BH)
470 {
471 }
472 
473 void OpWriter::operator()(std::ostream& out, const vertex& v) const
474 {
475  const auto* op_graph = dynamic_cast<const OpGraph*>(printing_graph);
477  {
478  out << "[color=red,shape=diamond,";
479  }
480  else if(GET_TYPE(printing_graph, v) & TYPE_LOAD)
481  {
482  out << "[color=green,shape=box,";
483  }
484  else if(GET_TYPE(printing_graph, v) & TYPE_STORE)
485  {
486  out << "[color=red,shape=box,";
487  }
488  else if(GET_TYPE(printing_graph, v) & TYPE_EXTERNAL)
489  {
490  out << "[color=green,shape=box,";
491  }
492  else if(GET_TYPE(printing_graph, v) & TYPE_MEMCPY)
493  {
494  out << "[color=burlywood,shape=diamond,";
495  }
496  else if(GET_TYPE(printing_graph, v) & TYPE_GOTO)
497  {
498  out << "[color=yellow,shape=box,";
499  }
500  else if(GET_TYPE(printing_graph, v) & TYPE_ASSIGN)
501  {
502  out << "[color=burlywood,shape=box,";
503  }
504  else if(GET_TYPE(printing_graph, v) & (TYPE_ENTRY | TYPE_EXIT))
505  {
506  out << "[color=blue,shape=Msquare,";
507  }
508  else
509  {
510  out << "[shape=ellipse,";
511  }
512  out << "label=\"" << GET_NAME(printing_graph, v);
513 #if HAVE_HLS_BUILT
514  out << " - " << op_graph->CGetOpNodeInfo(v)->GetOperation();
515 #endif
517  if(op_graph->CGetOpNodeInfo(v)->node)
518  {
519  out << "\\n";
520  null_deleter null_del;
521  out << helper->print_vertex(OpGraphConstRef(dynamic_cast<const OpGraph*>(printing_graph), null_del), v, svpf,
522  true);
523  if(detail_level >= 1)
524  {
525  out << "\\n";
526  op_graph->CGetOpNodeInfo(v)->Print(out, helper, true);
527  }
528  }
529  out << "\"]";
530 }
531 
532 #if HAVE_HLS_BUILT
533 TimedOpWriter::TimedOpWriter(const OpGraph* op_graph, const hlsConstRef _HLS,
534  const CustomSet<unsigned int> _critical_paths)
535  : OpWriter(op_graph, 0), HLS(_HLS), critical_paths(_critical_paths)
536 {
537 }
538 
539 void TimedOpWriter::operator()(std::ostream& out, const vertex& v) const
540 {
541  const auto schedule = HLS->Rsch;
542  const auto* op_graph = dynamic_cast<const OpGraph*>(printing_graph);
543  const unsigned node_id = op_graph->CGetOpNodeInfo(v)->GetNodeId();
544  if(critical_paths.find(node_id) != critical_paths.end())
545  {
546  out << "[color=red,";
547  }
548  else
549  {
550  out << "[";
551  }
552  out << "label=\"";
553  out << "[" << schedule->GetStartingTime(node_id) << "---" << schedule->GetEndingTime(node_id) << "]";
554  out << " - " << GET_NAME(printing_graph, v);
555  out << " - " << HLS->allocation_information->get_fu_name(HLS->allocation_information->GetFuType(node_id)).first;
557  if(op_graph->CGetOpNodeInfo(v)->node)
558  {
559  out << "\\n";
560  null_deleter null_del;
561  out << helper->print_vertex(OpGraphConstRef(dynamic_cast<const OpGraph*>(printing_graph), null_del), v, svpf,
562  true);
563  if(detail_level >= 1)
564  {
565  out << "\\n";
566  op_graph->CGetOpNodeInfo(v)->Print(out, helper, true);
567  }
568  }
569  out << "\"]";
570 }
571 
572 TimedOpEdgeWriter::TimedOpEdgeWriter(const OpGraph* _operation_graph, const hlsConstRef _HLS,
573  CustomSet<unsigned int> _critical_paths)
574  : OpEdgeWriter(_operation_graph), HLS(_HLS), critical_paths(std::move(_critical_paths))
575 {
576 }
577 
578 void TimedOpEdgeWriter::operator()(std::ostream& out, const EdgeDescriptor& e) const
579 {
580  const auto source = boost::source(e, *printing_graph);
581  const auto target = boost::target(e, *printing_graph);
582  const auto* op_graph = dynamic_cast<const OpGraph*>(printing_graph);
583  const auto source_id = op_graph->CGetOpNodeInfo(source)->GetNodeId();
584  const auto target_id = op_graph->CGetOpNodeInfo(target)->GetNodeId();
585  out << "[";
586  if(critical_paths.find(source_id) != critical_paths.end() and critical_paths.find(target_id) != critical_paths.end())
587  {
588  out << "color=red,";
589  }
590  const ControlStep u_control_step(AbsControlStep::UNKNOWN);
591  out << "label="
592  << HLS->allocation_information->GetConnectionTime(
593  source_id, target_id, AbsControlStep(op_graph->CGetOpNodeInfo(target)->bb_index, u_control_step));
594  out << "]";
595 }
596 #endif
#define GET_NODE(t)
Macro used to hide implementation details when accessing a tree_node from another tree_node...
Definition: tree_node.hpp:343
#define TYPE_SWITCH
constant identifying the node type of a SWITCH operation.
Definition: op_graph.hpp:105
#define FLG_SELECTOR
Flow edge selector.
Definition: op_graph.hpp:515
int GetSelector() const
Return the selector of this graph.
Definition: graph.hpp:922
Data structure representing the entire HLS information.
#define GET_TYPE(data, vertex_index)
Helper macro returning the type associated with a node.
const int detail_level
The detail level.
Definition: graph.hpp:1413
OpEdgeWriter(const OpGraph *operation_graph)
Constructor.
const graph * printing_graph
The graph to be printed.
Definition: graph.hpp:1410
#define CASE_BINARY_EXPRESSION
This macro collects all case labels for binary_expr objects.
Definition: tree_node.hpp:463
string target
Definition: lenet_tvm.py:16
#define TYPE_IF
constant identifying the node type of an IF operation.
Definition: op_graph.hpp:100
Definition of the class representing a generic C application.
#define CASE_DECL_NODES
NOTE that cast_expr is a unary expression but it could not be included in the CASE_UNARY_EXPRESSION b...
Definition: tree_node.hpp:672
void operator()(std::ostream &out, const vertex &v) const override
Operator used to print the label of a vertex.
Edge writer for operation graph.
#define GET_NAME(data, vertex_index)
Helper macro returning the name associated with a node.
exceptions managed by PandA
#define FCFG_SELECTOR
Control flow graph with feedback edges.
#define DEBUG_SELECTOR
Debug selector.
Definition: op_graph.hpp:521
#define D_SELECTOR
Selectors used only in basic block graphs; numbers continue from cdfg_edge_info.hpp.
Definition: basic_block.hpp:85
static const ControlStep UNKNOWN
Constant used to specify unknown control step.
Definition: schedule.hpp:93
const BehavioralHelperConstRef helper
The behavioral helper.
Definition of hash function for EdgeDescriptor.
Definition: graph.hpp:1321
refcount< const OpGraph > OpGraphConstRef
Definition: op_graph.hpp:923
#define GET_INDEX_NODE(t)
Macro used to hide implementation details when accessing a tree_node from another tree_node...
Definition: tree_node.hpp:361
#define FADG_SELECTOR
Anti-dependence graph selector with feedback edges.
Definition: op_graph.hpp:474
CustomUnorderedSet< vertex > annotated
The set of vertices to be annotated.
#define FB_FLG_SELECTOR
Feedback flow edge selector.
Definition: op_graph.hpp:518
#define FB_CDG_SELECTOR
Feedback control dependence edge selector.
Data structure describing a basic block at tree level.
Base class description of data information associated with each node of a graph.
redefinition of map to manage ordered/unordered structures
Absolute Control step First field is the basic block Second field is the relative control step...
Definition: schedule.hpp:89
#define TYPE_LOAD
Constant string identifying a memory load operation.
Definition: op_graph.hpp:172
virtual enum kind get_kind() const =0
Virtual function returning the type of the actual class.
#define STR(s)
Macro which performs a lexical_cast to a string.
Auxiliary methods for manipulating string.
#define FB_CFG_SELECTOR
Feedback control flow edge selector.
const graph * printing_graph
The graph to be printed.
Definition: graph.hpp:1445
const OpNodeInfoConstRef CGetOpNodeInfo(const vertex node) const
Returns the info associated with a node.
Definition: op_graph.hpp:843
#define TYPE_EXIT
constant identifying the node type of an exit node.
#define THROW_UNREACHABLE(str_expr)
helper function used to specify that some points should never be reached
Definition: exceptions.hpp:292
const BehavioralHelperConstRef BH
The helper used to print the labels.
Class specification for storing profiling information.
Standard functor that returns the name of a variable.
#define J_SELECTOR
j graph edge selector for dj graph (used during loop computation)
Definition: basic_block.hpp:91
Class used to describe a particular graph with basic blocks as nodes.
#define TYPE_GOTO
A vertex is of type TYPE_GOTO when it is associated with a goto expression.
Definition: op_graph.hpp:157
#define PP_SELECTOR
Path Profiling Basic Block edge selector.
Definition: basic_block.hpp:94
#define CDG_SELECTOR
Control dependence edge selector.
Data structure used to store the schedule of the operations.
Functor used to write the content of a vertex to dotty file.
Definition: graph.hpp:1406
#define CASE_QUATERNARY_EXPRESSION
This macro collects all case labels for quaternary_expr objects.
Definition: tree_node.hpp:574
#define CASE_UNARY_EXPRESSION
This macro collects all case labels for unary_expr objects.
Definition: tree_node.hpp:371
#define ODG_SELECTOR
Output-dependence graph edge selector.
Definition: op_graph.hpp:481
This C++ header file contains common macros for the tree structure.
#define TYPE_EXTERNAL
constant identifying the node type of a EXTERNAL operation (a function call)
Definition: op_graph.hpp:95
#define CSG_SELECTOR
Control edge in a speculation graph.
Definition: op_graph.hpp:507
#define TYPE_STORE
Constant string identifying a memory store operation.
Definition: op_graph.hpp:177
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Definition: graph.hpp:1303
const int selector
The selector of the graph to be printed.
Definition: graph.hpp:1448
void operator()(std::ostream &out, const EdgeDescriptor &e) const override
Operator which print label of an EdgeDescriptor.
Classes specification of the tree_node data structures.
#define FDFG_SELECTOR
Data flow graph with feedback edges.
Definition: op_graph.hpp:459
This package is used by all HLS packages to manage resource constraints and characteristics.
void operator()(std::ostream &out, const EdgeDescriptor &e) const override
Operator used to print an edge.
#define DFG_SELECTOR
Data flow graph edge selector.
Definition: op_graph.hpp:451
#define ADG_SELECTOR
Anti-dependence graph edge selector.
Definition: op_graph.hpp:466
#define TYPE_ASSIGN
constant string identifying the node type of an ASSIGN operation.
Definition: op_graph.hpp:125
#define CASE_TYPE_NODES
This macro collects all case labels for type objects.
Definition: tree_node.hpp:581
#define FB_DFG_SELECTOR
Feedback Data flow graph edge selector.
Definition: op_graph.hpp:457
null deleter
Definition: refcount.hpp:51
Data structures used to represent an edge in operation and basic block graphs.
#define FODG_SELECTOR
Output-dependence graph selector with feedback edges.
Definition: op_graph.hpp:489
#define DFG_SCA_SELECTOR
Selectors used only in operation graphs; numbers continue from cdfg_edge_info.hpp.
Definition: op_graph.hpp:447
#define TYPE_MEMCPY
A vertex is of type TYPE_MEMCPY when it is associated with a assignment between struct/union.
Definition: op_graph.hpp:182
#define CASE_CST_NODES
This macro collects all case labels for cast nodes.
Definition: tree_node.hpp:689
Functor used to write the content of the edges to a dotty file.
Definition: graph.hpp:1441
BBWriter(const BBGraph *g, CustomUnorderedSet< vertex > annotated=CustomUnorderedSet< vertex >())
The constructor.
Class specification of the tree_reindex support class.
#define CASE_FAKE_NODES
This macro collects all case labels for fake or empty nodes.
Definition: tree_node.hpp:635
Collect all structs used to write a graph in the dot format.
T * GetPointer(const refcount< U > &t)
Template function used to hide dynamic_cast The template parameter T represents a type of an object h...
Definition: refcount.hpp:237
Class specification of the basic_block structure.
const BehavioralHelperConstRef BH
The helper used to print the labels.
#define PD_SELECTOR
post-dominator graph edge selector
Definition: basic_block.hpp:88
const FunctionBehaviorConstRef function_behavior
The function behavior.
Data structures used in operations graph.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
Definition: refcount.hpp:94
#define CASE_CPP_NODES
This macro collects all case labels for cpp nodes.
Definition: tree_node.hpp:644
#define TYPE_ENTRY
constant identifying the node type of an entry node.
#define DFG_AGG_SELECTOR
Data flow graph edge selector between computed on aggregates.
Definition: op_graph.hpp:449
void operator()(std::ostream &out, const vertex &v) const override
Functor to print the label of a vertex.
Class used to describe a particular graph with operations as nodes.
Definition: op_graph.hpp:783
#define CFG_SELECTOR
Control flow graph edge selector.
Data structure definition for high-level synthesis flow.
#define FB_ODG_SELECTOR
Feedback Output-dependence graph edge selector.
Definition: op_graph.hpp:487
#define ECFG_SELECTOR
Extended control flow graph selector.
BBEdgeWriter(const BBGraph *g)
Constructor.
#define CASE_TERNARY_EXPRESSION
This macro collects all case labels for ternary_expr objects.
Definition: tree_node.hpp:550
const BehavioralHelperConstRef helper
The helper.
A brief description of the C++ Header File.
#define FB_ADG_SELECTOR
Feedback anti-dependence graph edge selector.
Definition: op_graph.hpp:472
OpWriter(const OpGraph *operation_graph, const int detail_level)
Constructor.
#define FCDG_SELECTOR
Control dependence graph selector with feedback edges.
#define CASE_PRAGMA_NODES
This macro collects all case labels for pragma objects.
Definition: tree_node.hpp:610
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.
Definition: graph.hpp:1316

Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by doxygen 1.8.13