ia32: Use a more logical specification of operand sizes in the binary emitter.
[libfirm] / ir / be / bespill.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       Option handling for spiller.
23  * @author      Matthias Braun
24  * @date        12.10.2006
25  */
26 #ifndef FIRM_BE_BESPILL_H
27 #define FIRM_BE_BESPILL_H
28
29 #include "bearch.h"
30
31 extern int be_coalesce_spill_slots;
32 extern int be_do_remats;
33
34 /**
35  * An entry in the list of spill-algorithms.
36  */
37 typedef struct be_spiller_t {
38         /**
39          * The spill function.
40          *
41          * @param irg   the graph to spill on
42          * @param cls   the register class to spill
43          */
44         void (*spill)(ir_graph *irg, const arch_register_class_t *cls);
45 } be_spiller_t;
46
47 /**
48  * Register a new spill algorithm.
49  *
50  * @param name     the name of the spill algorithm,
51  *                 used to select it
52  * @param spiller  a spill entry
53  */
54 void be_register_spiller(const char *name, be_spiller_t *spiller);
55
56 /**
57  * Execute the selected spill algorithm
58  *
59  * @param irg   the graph to spill on
60  * @param cls   the register class to spill
61  */
62 void be_do_spill(ir_graph *irg, const arch_register_class_t *cls);
63
64 /**
65  * Adds additional copies, so constraints needing additional registers to be
66  * solved correctly induce the additional register pressure.
67  */
68 void be_pre_spill_prepare_constr(ir_graph *irg,
69                                  const arch_register_class_t *cls);
70
71 #endif