added new licence header
[libfirm] / ir / ir / ircgcons.h
1 /*
2  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
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.
10  *
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.
14  *
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
17  * PURPOSE.
18  */
19
20 /*
21  * Project:     libFIRM
22  * File name:   ir/ir/ircgcons.h
23  * Purpose:     Construction and removal of interprocedural representation
24  *              (explicit interprocedural dependencies).
25  * Author:      Hubert Schmid
26  * Modified by:
27  * Created:     09.06.2002
28  * CVS-ID:      $Id$
29  * Copyright:   (c) 2002-2003 Universität Karlsruhe
30  */
31 #ifndef _FIRM_IR_ICGCONS_H_
32 #define _FIRM_IR_ICGCONS_H_
33
34 #include "firm_types.h"
35
36 /** The state of the interprocedural view.
37  *
38  * This value indicates the state of the interprocedural view.
39  */
40 typedef enum {
41   ip_view_no,       /**< The interprocedural view is not constructed.  There are no
42                          view specific nodes (EndReg, Filter, Break ...) in any graph.  */
43   ip_view_valid,    /**< The interprocedural view is valid.  */
44   ip_view_invalid   /**< The interprocedural view is invalid.  Specific nodes are
45                          all still in the representation, but the graph is no more complete. */
46 } ip_view_state;
47
48 /** Return the current state of the interprocedural view. */
49 ip_view_state get_irp_ip_view_state(void);
50 /** Set the state of the interprocedural view to invalid. */
51 void set_irp_ip_view_invalid(void);
52
53 /** Construction of the interprocedural view.
54  *
55  * Construction of the interprocedural view.  A prior analysis must have set
56  * all possible callees in the corresponding fields of Call nodes.  Sets
57  * ip_view_valid in irp.
58  *
59  * @arg free_methods_arr: An array of all free methods, i.e., methods that
60  *                        are external visible.  These methods get an 'Unknown'
61  *                        caller.
62  * @arg arr_len           The number of free methods. */
63 void cg_construct(int arr_len, ir_entity *free_methods_arr[]);
64
65
66 /** Deconstruction of the interprocedural view.  Reduces memory consumption of
67     the ir. Sets ip_view_no in irp. */
68 void cg_destruct(void);
69
70 #endif /* _FIRM_IR_ICGCONS_H_ */