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
c05c098e
Commit
c05c098e
authored
Aug 10, 2006
by
Adam Szalkowski
Browse files
fixed bugs
parent
501b9264
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/bespillremat.c
View file @
c05c098e
...
...
@@ -87,10 +87,10 @@ static int opt_repair_schedule = 0;
static
int
opt_no_enlarge_liveness
=
0
;
static
int
opt_remat_while_live
=
1
;
static
int
opt_timeout
=
300
;
static
double
opt_cost_reload
=
8
.
0
static
double
opt_cost_memoperand
=
7
.
0
static
double
opt_cost_spill
=
50
.
0
static
double
opt_cost_remat
=
1
.
0
static
double
opt_cost_reload
=
8
.
0
;
static
double
opt_cost_memoperand
=
7
.
0
;
static
double
opt_cost_spill
=
50
.
0
;
static
double
opt_cost_remat
=
1
.
0
;
#ifdef WITH_LIBCORE
...
...
@@ -112,7 +112,7 @@ static const lc_opt_enum_mask_items_t keepalive_items[] = {
{
NULL
,
0
}
};
static
lc_opt_enum_mask_var_t
dump
_var
=
{
static
lc_opt_enum_mask_var_t
keep_alive
_var
=
{
&
opt_keep_alive
,
keepalive_items
};
...
...
@@ -124,7 +124,7 @@ static const lc_opt_enum_mask_items_t remats_items[] = {
{
NULL
,
0
}
};
static
lc_opt_enum_mask_var_t
dump
_var
=
{
static
lc_opt_enum_mask_var_t
remats
_var
=
{
&
opt_remats
,
remats_items
};
...
...
@@ -134,9 +134,9 @@ static const lc_opt_table_entry_t options[] = {
LC_OPT_ENT_BOOL
(
"goodwin"
,
"activate goodwin reduction"
,
&
opt_goodwin
),
LC_OPT_ENT_BOOL
(
"memcopies"
,
"activate memcopy handling"
,
&
opt_memcopies
),
LC_OPT_ENT_BOOL
(
"memoperands"
,
"activate memoperands"
,
&
opt_memoperands
),
LC_OPT_ENT_ENUM_INT
(
"remat"
,
"type of remats to insert (none, briggs, noinverse or all)"
,
&
remats_var
),
LC_OPT_ENT_ENUM_INT
(
"remat
s
"
,
"type of remats to insert (none, briggs, noinverse or all)"
,
&
remats_var
),
LC_OPT_ENT_BOOL
(
"repair_schedule"
,
"repair the schedule by rematting once used nodes"
,
&
opt_repair_schedule
),
LC_OPT_ENT_BOOL
(
"no_enlage_liveness"
,
"do not enlarge liveness of operands of remats"
,
&
opt_enlarge_liveness
),
LC_OPT_ENT_BOOL
(
"no_enlage_liveness"
,
"do not enlarge liveness of operands of remats"
,
&
opt_
no_
enlarge_liveness
),
LC_OPT_ENT_BOOL
(
"remat_while_live"
,
"remat only values that can be used by real ops"
,
&
opt_remat_while_live
),
LC_OPT_ENT_ENUM_MASK
(
"dump"
,
"dump ifg before, after or after each cloud"
,
&
dump_var
),
...
...
@@ -157,6 +157,7 @@ void be_spill_remat_register_options(lc_opt_entry_t *grp)
}
#endif
//#define EXECFREQ_LOOPDEPH /* compute execution frequency from loop depth only */
#define SOLVE
...
...
@@ -1341,7 +1342,7 @@ luke_endwalker(ir_node * bb, void * data)
ilp_cst_t
rel_cst
;
ir_snprintf
(
buf
,
sizeof
(
buf
),
"reload_%N_%N"
,
bb
,
irn
);
reload
=
lpp_add_var_default
(
si
->
lpp
,
buf
,
lpp_binary
,
opt_cost_reload
*
execution_frequency
(
si
,
bb
),
0
.
0
);
reload
=
lpp_add_var_default
(
si
->
lpp
,
buf
,
lpp_binary
,
opt_cost_reload
*
execution_frequency
(
si
,
bb
),
1
.
0
);
set_insert_keyval
(
spill_bb
->
reloads
,
irn
,
INT_TO_PTR
(
reload
));
/* reload <= mem_out */
...
...
@@ -3206,8 +3207,8 @@ delete_unnecessary_remats(spill_ilp_t * si)
ir_node
*
bad
=
get_irg_bad
(
si
->
chordal_env
->
irg
);
if
(
si
->
keep
)
{
ir_node
*
end
=
get_irg_end
(
si
->
chordal_env
->
irg
);
ir_node
**
keeps
;
//
ir_node *end = get_irg_end(si->chordal_env->irg);
//
ir_node **keeps;
for
(
n
=
get_irn_arity
(
si
->
keep
)
-
1
;
n
>=
0
;
--
n
)
{
ir_node
*
keep_arg
=
get_irn_n
(
si
->
keep
,
n
);
...
...
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