Added index -> node map to irgs
[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 __PSEUDO_IRG_H__
16 #define __PSEUDO_IRG_H__
17
18 #include "entity.h"
19 #include "irgraph.h"
20
21
22 /** Create a new ir graph to build a pseudo representation of a procedure.
23  *
24  *  The pseudo representation can only be used for analyses.  It may not be
25  *  optimized.  Pseudo graphs are kept in a separate graph list in irprog.
26  */
27 ir_graph *new_pseudo_ir_graph(entity *ent, int n_loc);
28
29 /** Returns non-zero ir ir_graph is pseudo graph.
30  *  Is irg a pseudo graph for analysis? */
31 int      is_pseudo_ir_graph(ir_graph *irg);
32
33 /** Returns the number of pseudo graphs in the program. */
34 int get_irp_n_pseudo_irgs(void);
35
36 /** Returns the pos'th  pseudo graph in the program. */
37 ir_graph *get_irp_pseudo_irg(int pos);
38
39
40 /** If set, get_irp_n_irgs() and get_irp_irg() behave as if all pseudo
41     graphs are in the irg list. If not set, get_entity_irg() returns
42     NULL if the entity refers to a pseudo irg. */
43 void set_visit_pseudo_irgs(int x);
44 int  get_visit_pseudo_irgs(void);
45
46 #endif