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 Option handling for spiller.
23 * @author Matthias Braun
26 #ifndef FIRM_BE_BESPILL_H
27 #define FIRM_BE_BESPILL_H
31 extern int be_coalesce_spill_slots;
32 extern int be_do_remats;
35 * An entry in the list of spill-algorithms.
37 typedef struct be_spiller_t {
41 * @param irg the graph to spill on
42 * @param cls the register class to spill
44 void (*spill)(ir_graph *irg, const arch_register_class_t *cls);
48 * Register a new spill algorithm.
50 * @param name the name of the spill algorithm,
52 * @param spiller a spill entry
54 void be_register_spiller(const char *name, be_spiller_t *spiller);
57 * Execute the selected spill algorithm
59 * @param irg the graph to spill on
60 * @param cls the register class to spill
62 void be_do_spill(ir_graph *irg, const arch_register_class_t *cls);
65 * Adds additional copies, so constraints needing additional registers to be
66 * solved correctly induce the additional register pressure.
68 void be_pre_spill_prepare_constr(ir_graph *irg,
69 const arch_register_class_t *cls);