grrrr bugfix
[libfirm] / ir / ir / irvrfy.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ir/irvrfy.h
4  * Purpose:     Check irnodes for correctness.
5  * Author:      Christian Schaefer
6  * Modified by: Goetz Lindenmaier. Till Riedel
7  * Created:
8  * CVS-ID:      $Id$
9  * Copyright:   (c) 1998-2003 Universität Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12
13 /**
14 * @file irvrfy.h
15 *
16 * ir graph verification.
17 *
18 * @author Christian Schaefer
19 */
20
21 # ifndef _IRVRFY_H_
22 # define _IRVRFY_H_
23
24 # include "irnode.h"
25 # include "irgraph.h"
26
27 /** Turns verification of nodes on.
28  *
29  *  This flag turns verification of nodes on.  Per default the
30  *  verification is on.  Turn the verification off
31  *  during development to check partial implementations.
32  */
33 void do_node_verification(bool b);
34
35 /**
36  * Tests the modes of chechnode and its predecessors.
37  * Checknode must be in current_ir_graph.
38  *
39  * \return
40  *      NON-zero on success
41  */
42 int irn_vrfy(struct ir_node *checknode);
43
44 /**
45  * Tests the modes of checknode and its predecessors.
46  * Checknode must be in given ir_graph.
47  *
48  * \return
49  *      NON-zero on success
50  */
51 int irn_vrfy_irg(struct ir_node *checknode, ir_graph *irg);
52
53
54 /**
55  * Calls irn_vrfy for each node in irg.
56  * Graph must be in state "pinned".
57  *
58  * \return
59  *      NON-zero on success.
60  */
61 int irg_vrfy(ir_graph *irg);
62
63
64 # endif /* _IRVRFY_H_ */