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
27 #ifndef FIRM_BE_BESPILL_H
28 #define FIRM_BE_BESPILL_H
33 extern int be_coalesce_spill_slots;
34 extern int be_do_remats;
37 * An entry in the list of spill-algorithms.
39 typedef struct be_spiller_t {
43 * @param irg the graph to spill on
44 * @param cls the register class to spill
46 void (*spill)(ir_graph *irg, const arch_register_class_t *cls);
50 * Register a new spill algorithm.
52 * @param name the name of the spill algorithm,
54 * @param spiller a spill entry
56 void be_register_spiller(const char *name, be_spiller_t *spiller);
59 * Execute the selected spill algorithm
61 * @param irg the graph to spill on
62 * @param cls the register class to spill
64 void be_do_spill(ir_graph *irg, const arch_register_class_t *cls);
67 * Adds additional copies, so constraints needing additional registers to be
68 * solved correctly induce the additional register pressure.
70 void be_pre_spill_prepare_constr(ir_graph *irg,
71 const arch_register_class_t *cls);