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
9f259c73
Commit
9f259c73
authored
Sep 12, 2007
by
Sebastian Hack
Browse files
Developed further... might be unstable. so don't use for the moment.
spill placement to be done. [r15765]
parent
fba7027d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
ir/be/bespill.c
View file @
9f259c73
...
...
@@ -69,6 +69,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
typedef
struct
reloader_t
reloader_t
;
struct
reloader_t
{
reloader_t
*
next
;
ir_node
*
can_spill_after
;
ir_node
*
reloader
;
ir_node
*
rematted_node
;
int
remat_cost_delta
;
/** costs needed for rematerialization,
...
...
@@ -209,7 +210,7 @@ void be_add_remat(spill_env_t *env, ir_node *to_spill, ir_node *before,
to_spill
,
before
));
}
void
be_add_reload
(
spill_env_t
*
env
,
ir_node
*
to_spill
,
ir_node
*
before
,
void
be_add_reload
2
(
spill_env_t
*
env
,
ir_node
*
to_spill
,
ir_node
*
before
,
ir_node
*
can_spill_after
,
const
arch_register_class_t
*
reload_cls
,
int
allow_remat
)
{
spill_info_t
*
info
;
...
...
@@ -244,15 +245,12 @@ void be_add_reload(spill_env_t *env, ir_node *to_spill, ir_node *before,
assert
(
!
is_Proj
(
before
)
&&
!
be_is_Keep
(
before
));
/* put reload into list */
rel
=
obstack_alloc
(
&
env
->
obst
,
sizeof
(
rel
[
0
]));
rel
->
next
=
info
->
reloaders
;
rel
->
reloader
=
before
;
rel
->
rematted_node
=
NULL
;
if
(
!
allow_remat
)
{
rel
->
remat_cost_delta
=
REMAT_COST_INFINITE
;
}
else
{
rel
->
remat_cost_delta
=
0
;
}
rel
=
obstack_alloc
(
&
env
->
obst
,
sizeof
(
rel
[
0
]));
rel
->
next
=
info
->
reloaders
;
rel
->
reloader
=
before
;
rel
->
rematted_node
=
NULL
;
rel
->
can_spill_after
=
can_spill_after
;
rel
->
remat_cost_delta
=
allow_remat
?
0
:
REMAT_COST_INFINITE
;
info
->
reloaders
=
rel
;
assert
(
info
->
reload_cls
==
NULL
||
info
->
reload_cls
==
reload_cls
);
...
...
@@ -262,6 +260,13 @@ void be_add_reload(spill_env_t *env, ir_node *to_spill, ir_node *before,
to_spill
,
before
,
allow_remat
?
""
:
" not"
));
}
void
be_add_reload
(
spill_env_t
*
senv
,
ir_node
*
to_spill
,
ir_node
*
before
,
const
arch_register_class_t
*
reload_cls
,
int
allow_remat
)
{
be_add_reload2
(
senv
,
to_spill
,
before
,
to_spill
,
reload_cls
,
allow_remat
);
}
ir_node
*
be_get_end_of_block_insertion_point
(
const
ir_node
*
block
)
{
ir_node
*
last
=
sched_last
(
block
);
...
...
ir/be/bespill.h
View file @
9f259c73
...
...
@@ -65,6 +65,9 @@ ir_node *be_get_end_of_block_insertion_point(const ir_node *block);
void
be_add_reload
(
spill_env_t
*
senv
,
ir_node
*
to_spill
,
ir_node
*
before
,
const
arch_register_class_t
*
reload_cls
,
int
allow_remat
);
void
be_add_reload2
(
spill_env_t
*
senv
,
ir_node
*
to_spill
,
ir_node
*
before
,
ir_node
*
can_spill_after
,
const
arch_register_class_t
*
reload_cls
,
int
allow_remat
);
/**
* Add a reload at the end of a block.
* Similar to be_add_reload_on_edge().
...
...
ir/be/bespillbelady2.c
View file @
9f259c73
This diff is collapsed.
Click to expand it.
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