reset node index on dead node elimination
[libfirm] / ir / ir / ircgcons.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ir/ircgcons.h
4  * Purpose:     Construction and removal of interprocedural representation
5  *              (explicit interprocedural dependencies).
6  * Author:      Hubert Schmid
7  * Modified by:
8  * Created:     09.06.2002
9  * CVS-ID:      $Id$
10  * Copyright:   (c) 2002-2003 Universität Karlsruhe
11  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
12  */
13
14
15 #ifndef _CONSTRUCT_H_
16 #define _CONSTRUCT_H_
17
18
19 #include "entity.h"
20
21 /** The state of the interprocedural view.
22  *
23  * This value indicates the state of the interprocedural view.
24  */
25 typedef enum {
26   ip_view_no,       /**< The interprocedural view is not constructed.  There are no
27                          view specific nodes (EndReg, Filter, Break ...) in any graph.  */
28   ip_view_valid,    /**< The interprocedural view is valid.  */
29   ip_view_invalid   /**< The interprocedural view is invalid.  Specific nodes are
30                          all still in the representation, but the graph is no more complete. */
31 } ip_view_state;
32
33 /** Return the current state of the interprocedural view. */
34 ip_view_state get_irp_ip_view_state(void);
35 /** Set the state of the interprocedural view to invalid. */
36 void set_irp_ip_view_invalid(void);
37
38 /** Construction of the interprocedural view.
39  *
40  * Construction of the interprocedural view.  A prior analysis must have set
41  * all possible callees in the corresponding fields of Call nodes.  Sets
42  * ip_view_valid in irp.
43  *
44  * @arg free_methods_arr: An array of all free methods, i.e., methods that
45  *                        are external visible.  These methods get an 'Unknown'
46  *                        caller.
47  * @arg arr_len           The number of free methods. */
48 void cg_construct(int arr_len, entity *free_methods_arr[]);
49
50
51 /** Deconstruction of the interprocedural view.  Reduces memory consumption of
52     the ir. Sets ip_view_no in irp. */
53 void cg_destruct(void);
54
55
56 #endif /* _CONSTRUCT_H_ */