changed inline to INLINE, removed C99
[libfirm] / ir / stat / pattern_dmp.h
1 #ifndef _PATTERN_DMP_H_
2 #define _PATTERN_DMP_H_
3
4 #include "counter.h"
5
6 typedef struct _pattern_dumper_t pattern_dumper_t;
7
8 /**
9  * Starts a new pattern.
10  */
11 void pattern_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt);
12
13 /**
14  * Finish the current pattern.
15  */
16 void pattern_dump_finish_pattern(pattern_dumper_t *self);
17
18 /**
19  * Dumps a node.
20  */
21 void pattern_dump_node(pattern_dumper_t *self, unsigned id, unsigned op_code, unsigned mode_code, void *attr);
22
23 /**
24  * Dump a ref.
25  */
26 void pattern_dump_ref(pattern_dumper_t *self, unsigned id);
27
28 /**
29  * Dump an edge.
30  *
31  * @param tgt       The target ID
32  * @param src       The source ID
33  * @param pos       The edge position
34  * @param mode_code The mode_code of the edge
35  */
36 void pattern_dump_edge(pattern_dumper_t *self, unsigned tgt, unsigned src, unsigned pos, unsigned mode_code);
37
38 /**
39  * Start the children dumper.
40  */
41 void pattern_start_children(pattern_dumper_t *self, unsigned id);
42
43 /**
44  * Finish the children dumper.
45  */
46 void pattern_finish_children(pattern_dumper_t *self, unsigned id);
47
48 /**
49  * Finish the dumper, destroys the dumper object
50  */
51 void pattern_end(pattern_dumper_t *self);
52
53 /**
54  * Pattern dumper factory for text dumper.
55  */
56 pattern_dumper_t *new_text_dumper(void);
57
58 /**
59  * Pattern dumper factory for vcg dumper.
60  *
61  * @param vcg_name    name of the VCG file
62  * @param max_pattern maximum number of pattern to be dumped
63  */
64 pattern_dumper_t *new_vcg_dumper(const char *vcg_name, unsigned max_pattern);
65
66 #endif /* _PATTERN_DMP_H_ */