2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief Common functions for chordal register allocation.
23 * @author Sebastian Hack
27 #ifndef BECHORDAL_COMMON_H_
28 #define BECHORDAL_COMMON_H_
32 #include "bechordal.h"
36 * Annotate the register pressure to the nodes and compute
37 * the liveness intervals.
38 * @param block The block to do it for.
39 * @param env_ptr The environment.
41 void create_borders(ir_node *block, void *env_ptr);
44 * Check, if an irn is of the register class currently under processing.
45 * @param env The chordal environment.
46 * @param irn The node.
47 * @return 1, if the node is of that register class, 0 if not.
49 int has_reg_class(const be_chordal_env_t *env, const ir_node *irn);
53 * @param env The chordal environment.
54 * @param the_insn The current be_insn node.
55 * @return The new perm node.
57 ir_node *pre_process_constraints(be_chordal_env_t *_env, be_insn_t **the_insn);
60 * Create a be_insn_t for an IR node.
61 * @param env The chordal environment.
62 * @param irn The node.
63 * @return the be_insn for the IR node
65 be_insn_t *chordal_scan_insn(be_chordal_env_t *env, ir_node *irn);
67 #endif /* BECHORDAL_COMMON_H_ */