Fixed help
[libfirm] / include / libfirm / irlivechk_old.h
1 /*
2  * Copyright (C) 1995-2007 Inria Rhone-Alpes.  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  * @file    irlivechk_old.h
22  * @author  Sebastian Hack
23  * @date    22.04.2007
24  * @version $Id: irlivechk.h 14703 2007-06-21 16:46:26Z hack $
25  * @summary
26  *
27  * Live in/end checks whose only precomputation concerns the structure of the CFG.
28  * Hence, nothing has to be updated if the program is modified unless the CFG is touched.
29  * See .c file for more comments.
30  *
31  * This is the old version. The new one in irlivechk.[ch] should be a little bit faster.
32  */
33 #ifndef FIRM_ANA_IRLIVECHK_OLD_H
34 #define FIRM_ANA_IRLIVECHK_OLD_H
35
36 #include "irlivechk.h"
37 #include "irgraph.h"
38 #include "irnode.h"
39
40
41 typedef struct _lv_chk_old_t lv_chk_old_t;
42
43 /**
44  * Make a new liveness check environment.
45  * @param irg The graph.
46  * @return    The environment.
47  */
48 extern lv_chk_old_t *lv_chk_old_new(ir_graph *irg);
49
50 /**
51  * Free liveness check information.
52  * @param lv The liveness check information.
53  */
54 extern void lv_chk_old_free(lv_chk_old_t *lv);
55
56
57 /**
58  * Return liveness information for a node concerning a block.
59  * @param lv   The liveness environment.
60  * @param bl   The block to investigate.
61  * @param irn  The node to check for.
62  * @return     A bitmask of <code>lv_chk_state_t</code>.
63  */
64 extern unsigned lv_chk_old_bl_xxx(const lv_chk_old_t *lv, const ir_node *bl, const ir_node *irn);
65
66 #define lv_chk_old_bl_in(lv, bl, irn)  ((lv_chk_old_bl_xxx((lv), (bl), (irn)) & lv_chk_state_in)  != 0)
67 #define lv_chk_old_bl_end(lv, bl, irn) ((lv_chk_old_bl_xxx((lv), (bl), (irn)) & lv_chk_state_end) != 0)
68 #define lv_chk_old_bl_out(lv, bl, irn) ((lv_chk_old_bl_xxx((lv), (bl), (irn)) & lv_chk_state_out) != 0)
69
70 #endif /* FIRM_ANA_IRLIVECHK_OLD_H */