2 * Copyright (C) 1995-2007 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
20 #ifndef _PATTERN_DMP_H_
21 #define _PATTERN_DMP_H_
25 typedef struct _pattern_dumper_t pattern_dumper_t;
28 * Starts a new pattern.
30 void pattern_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt);
33 * Finish the current pattern.
35 void pattern_dump_finish_pattern(pattern_dumper_t *self);
40 void pattern_dump_node(pattern_dumper_t *self, unsigned id, unsigned op_code, unsigned mode_code, void *attr);
45 void pattern_dump_ref(pattern_dumper_t *self, unsigned id);
50 * @param tgt The target ID
51 * @param src The source ID
52 * @param pos The edge position
53 * @param mode_code The mode_code of the edge
55 void pattern_dump_edge(pattern_dumper_t *self, unsigned tgt, unsigned src, unsigned pos, unsigned mode_code);
58 * Start the children dumper.
60 void pattern_start_children(pattern_dumper_t *self, unsigned id);
63 * Finish the children dumper.
65 void pattern_finish_children(pattern_dumper_t *self, unsigned id);
68 * Finish the dumper, destroys the dumper object
70 void pattern_end(pattern_dumper_t *self);
73 * Pattern dumper factory for text dumper.
75 pattern_dumper_t *new_text_dumper(void);
78 * Pattern dumper factory for vcg dumper.
80 * @param vcg_name name of the VCG file
81 * @param max_pattern maximum number of pattern to be dumped
83 pattern_dumper_t *new_vcg_dumper(const char *vcg_name, unsigned max_pattern);
85 #endif /* _PATTERN_DMP_H_ */