give Bad nodes a mode
[libfirm] / ir / be / bechordal_common.h
1 /*
2  * Copyright (C) 1995-2008 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  * @file
22  * @brief       Common functions for chordal register allocation.
23  * @author      Sebastian Hack
24  * @date        08.12.2004
25  * @version     $Id: bechordal.c 26750 2009-11-27 09:37:43Z bersch $
26  */
27
28 #ifndef BECHORDAL_COMMON_H_
29 #define BECHORDAL_COMMON_H_
30
31 #include "config.h"
32
33 #include "bechordal.h"
34 #include "beinsn_t.h"
35
36 /**
37  * Annotate the register pressure to the nodes and compute
38  * the liveness intervals.
39  * @param block The block to do it for.
40  * @param env_ptr The environment.
41  */
42 void create_borders(ir_node *block, void *env_ptr);
43
44 /**
45  * Check, if an irn is of the register class currently under processing.
46  * @param env The chordal environment.
47  * @param irn The node.
48  * @return 1, if the node is of that register class, 0 if not.
49  */
50 int has_reg_class(const be_chordal_env_t *env, const ir_node *irn);
51
52 /**
53  * Insert perm nodes
54  * @param env The chordal environment.
55  * @param the_insn The current be_insn node.
56  * @return The new perm node.
57  */
58 ir_node *pre_process_constraints(be_chordal_env_t *_env, be_insn_t **the_insn);
59
60 /**
61  * Create a be_insn_t for an IR node.
62  * @param env The chordal environment.
63  * @param irn The node.
64  * @return the be_insn for the IR node
65  */
66 be_insn_t *chordal_scan_insn(be_chordal_env_t *env, ir_node *irn);
67
68 #endif /* BECHORDAL_COMMON_H_ */