Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
093d930a
Commit
093d930a
authored
Nov 07, 2013
by
Matthias Braun
Browse files
get rid of unnecessary be_spiller_t struct
parent
8bf06a8b
Changes
4
Hide whitespace changes
Inline
Side-by-side
ir/be/bespill.c
View file @
093d930a
...
...
@@ -206,10 +206,10 @@ static const lc_opt_table_entry_t be_spill_options[] = {
LC_OPT_LAST
};
static
be_module_list_entry_t
*
spillers
=
NULL
;
static
const
be_spill
er_t
*
selected_spiller
=
NULL
;
static
be_module_list_entry_t
*
spillers
;
static
be_spill
_func
selected_spiller
;
void
be_register_spiller
(
const
char
*
name
,
be_spill
er_t
*
spiller
)
void
be_register_spiller
(
const
char
*
name
,
be_spill
_func
spiller
)
{
if
(
selected_spiller
==
NULL
)
selected_spiller
=
spiller
;
...
...
@@ -219,8 +219,7 @@ void be_register_spiller(const char *name, be_spiller_t *spiller)
void
be_do_spill
(
ir_graph
*
irg
,
const
arch_register_class_t
*
cls
)
{
assert
(
selected_spiller
!=
NULL
);
selected_spiller
->
spill
(
irg
,
cls
);
selected_spiller
(
irg
,
cls
);
}
BE_REGISTER_MODULE_CONSTRUCTOR
(
be_init_spilloptions
)
...
...
ir/be/bespill.h
View file @
093d930a
...
...
@@ -17,18 +17,7 @@
extern
int
be_coalesce_spill_slots
;
extern
int
be_do_remats
;
/**
* An entry in the list of spill-algorithms.
*/
typedef
struct
be_spiller_t
{
/**
* The spill function.
*
* @param irg the graph to spill on
* @param cls the register class to spill
*/
void
(
*
spill
)(
ir_graph
*
irg
,
const
arch_register_class_t
*
cls
);
}
be_spiller_t
;
typedef
void
(
*
be_spill_func
)(
ir_graph
*
irg
,
const
arch_register_class_t
*
cls
);
/**
* Register a new spill algorithm.
...
...
@@ -37,7 +26,7 @@ typedef struct be_spiller_t {
* used to select it
* @param spiller a spill entry
*/
void
be_register_spiller
(
const
char
*
name
,
be_spill
er_t
*
spiller
);
void
be_register_spiller
(
const
char
*
name
,
be_spill
_func
spiller
);
/**
* Execute the selected spill algorithm
...
...
ir/be/bespillbelady.c
View file @
093d930a
...
...
@@ -888,13 +888,10 @@ static void be_spill_belady(ir_graph *irg, const arch_register_class_t *rcls)
BE_REGISTER_MODULE_CONSTRUCTOR
(
be_init_spillbelady
)
void
be_init_spillbelady
(
void
)
{
static
be_spiller_t
belady_spiller
=
{
be_spill_belady
};
lc_opt_entry_t
*
be_grp
=
lc_opt_get_grp
(
firm_opt_get_root
(),
"be"
);
lc_opt_entry_t
*
belady_group
=
lc_opt_get_grp
(
be_grp
,
"belady"
);
lc_opt_add_table
(
belady_group
,
options
);
be_register_spiller
(
"belady"
,
&
be
lady
_spill
er
);
be_register_spiller
(
"belady"
,
be_spill
_belady
);
FIRM_DBG_REGISTER
(
dbg
,
"firm.be.spill.belady"
);
}
ir/be/bespilldaemel.c
View file @
093d930a
...
...
@@ -344,10 +344,6 @@ static void be_spill_daemel(ir_graph *irg, const arch_register_class_t *new_cls)
BE_REGISTER_MODULE_CONSTRUCTOR
(
be_init_daemelspill
)
void
be_init_daemelspill
(
void
)
{
static
be_spiller_t
daemel_spiller
=
{
be_spill_daemel
};
be_register_spiller
(
"daemel"
,
&
daemel_spiller
);
be_register_spiller
(
"daemel"
,
&
be_spill_daemel
);
FIRM_DBG_REGISTER
(
dbg
,
"firm.be.spilldaemel"
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment