becopyopt: Use the set of admissible registers from bechordal.
[libfirm] / ir / be / bespill.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       Option handling for spiller.
9  * @author      Matthias Braun
10  * @date        12.10.2006
11  */
12 #ifndef FIRM_BE_BESPILL_H
13 #define FIRM_BE_BESPILL_H
14
15 #include "bearch.h"
16
17 extern int be_coalesce_spill_slots;
18 extern int be_do_remats;
19
20 /**
21  * An entry in the list of spill-algorithms.
22  */
23 typedef struct be_spiller_t {
24         /**
25          * The spill function.
26          *
27          * @param irg   the graph to spill on
28          * @param cls   the register class to spill
29          */
30         void (*spill)(ir_graph *irg, const arch_register_class_t *cls);
31 } be_spiller_t;
32
33 /**
34  * Register a new spill algorithm.
35  *
36  * @param name     the name of the spill algorithm,
37  *                 used to select it
38  * @param spiller  a spill entry
39  */
40 void be_register_spiller(const char *name, be_spiller_t *spiller);
41
42 /**
43  * Execute the selected spill algorithm
44  *
45  * @param irg   the graph to spill on
46  * @param cls   the register class to spill
47  */
48 void be_do_spill(ir_graph *irg, const arch_register_class_t *cls);
49
50 /**
51  * Adds additional copies, so constraints needing additional registers to be
52  * solved correctly induce the additional register pressure.
53  */
54 void be_pre_spill_prepare_constr(ir_graph *irg,
55                                  const arch_register_class_t *cls);
56
57 #endif