remove $Id$, it doesn't work with git anyway
[libfirm] / ir / stat / pattern_dmp.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   Statistics for Firm. Dumping patterns.
23  * @author  Michael Beck
24  */
25 #ifndef FIRM_STAT_PATTERN_DMP_H
26 #define FIRM_STAT_PATTERN_DMP_H
27
28 #include "counter.h"
29
30 typedef struct pattern_dumper_t pattern_dumper_t;
31
32 /**
33  * Starts a new pattern.
34  */
35 void pattern_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt);
36
37 /**
38  * Finish the current pattern.
39  */
40 void pattern_dump_finish_pattern(pattern_dumper_t *self);
41
42 /**
43  * Dumps a node.
44  */
45 void pattern_dump_node(pattern_dumper_t *self, unsigned id, unsigned op_code, unsigned mode_code, void *attr);
46
47 /**
48  * Dump a ref.
49  */
50 void pattern_dump_ref(pattern_dumper_t *self, unsigned id);
51
52 /**
53  * Dump an edge.
54  *
55  * @param tgt       The target ID
56  * @param src       The source ID
57  * @param pos       The edge position
58  * @param mode_code The mode_code of the edge
59  */
60 void pattern_dump_edge(pattern_dumper_t *self, unsigned tgt, unsigned src, unsigned pos, unsigned mode_code);
61
62 /**
63  * Start the children dumper.
64  */
65 void pattern_start_children(pattern_dumper_t *self, unsigned id);
66
67 /**
68  * Finish the children dumper.
69  */
70 void pattern_finish_children(pattern_dumper_t *self, unsigned id);
71
72 /**
73  * Finish the dumper, destroys the dumper object
74  */
75 void pattern_end(pattern_dumper_t *self);
76
77 /**
78  * Pattern dumper factory for text dumper.
79  */
80 pattern_dumper_t *new_text_dumper(void);
81
82 /**
83  * Pattern dumper factory for vcg dumper.
84  *
85  * @param vcg_name    name of the VCG file
86  * @param max_pattern maximum number of pattern to be dumped
87  */
88 pattern_dumper_t *new_vcg_dumper(const char *vcg_name, unsigned max_pattern);
89
90 #endif /* FIRM_STAT_PATTERN_DMP_H */