Use is_Bad() where appropriate
[libfirm] / ir / ir / pseudo_irg.h
1 /* -*- c -*- */
2
3 /*
4  * Project:     libFIRM
5  * File name:   ir/external/pseudo_irg.h
6  * Purpose:     interface to pseudo irgs
7  * Author:      G"otz Lindenmaier
8  * Modified by: Boris Boesler
9  * Created:     xx.10.2004
10  * CVS-ID:      $Id$
11  * Copyright:   (c) 1999-2004 Universität Karlsruhe
12  * Licence:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
13  */
14
15 #ifndef _FIRM_IR_PSEUDO_IRG_H_
16 #define _FIRM_IR_PSEUDO_IRG_H_
17
18 #include "firm_types.h"
19
20 /** Create a new ir graph to build a pseudo representation of a procedure.
21  *
22  *  The pseudo representation can only be used for analyses.  It may not be
23  *  optimized.  Pseudo graphs are kept in a separate graph list in irprog.
24  */
25 ir_graph *new_pseudo_ir_graph(entity *ent, int n_loc);
26
27 /** Returns non-zero ir ir_graph is pseudo graph.
28  *  Is irg a pseudo graph for analysis? */
29 int      is_pseudo_ir_graph(ir_graph *irg);
30
31 /** Returns the number of pseudo graphs in the program. */
32 int get_irp_n_pseudo_irgs(void);
33
34 /** Returns the pos'th  pseudo graph in the program. */
35 ir_graph *get_irp_pseudo_irg(int pos);
36
37
38 /** If set, get_irp_n_irgs() and get_irp_irg() behave as if all pseudo
39     graphs are in the irg list. If not set, get_entity_irg() returns
40     NULL if the entity refers to a pseudo irg. */
41 void set_visit_pseudo_irgs(int x);
42 int  get_visit_pseudo_irgs(void);
43
44 #endif /* _FIRM_IR_PSEUDO_IRG_H_ */