2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief Statistics for Firm. Dumping patterns.
23 * @author Michael Beck
25 #ifndef FIRM_STAT_PATTERN_DMP_H
26 #define FIRM_STAT_PATTERN_DMP_H
30 typedef struct pattern_dumper_t pattern_dumper_t;
33 * Starts a new pattern.
35 void pattern_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt);
38 * Finish the current pattern.
40 void pattern_dump_finish_pattern(pattern_dumper_t *self);
45 void pattern_dump_node(pattern_dumper_t *self, unsigned id, unsigned op_code, unsigned mode_code, void *attr);
50 void pattern_dump_ref(pattern_dumper_t *self, unsigned id);
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
60 void pattern_dump_edge(pattern_dumper_t *self, unsigned tgt, unsigned src, unsigned pos, unsigned mode_code);
63 * Start the children dumper.
65 void pattern_start_children(pattern_dumper_t *self, unsigned id);
68 * Finish the children dumper.
70 void pattern_finish_children(pattern_dumper_t *self, unsigned id);
73 * Finish the dumper, destroys the dumper object
75 void pattern_end(pattern_dumper_t *self);
78 * Pattern dumper factory for text dumper.
80 pattern_dumper_t *new_text_dumper(void);
83 * Pattern dumper factory for vcg dumper.
85 * @param vcg_name name of the VCG file
86 * @param max_pattern maximum number of pattern to be dumped
88 pattern_dumper_t *new_vcg_dumper(const char *vcg_name, unsigned max_pattern);
90 #endif /* FIRM_STAT_PATTERN_DMP_H */