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
e8bdf4f6
Commit
e8bdf4f6
authored
Oct 09, 2006
by
Christian Würdig
Browse files
fixed gen_Load (add Proj for unused volatile Loads before renumbering)
parent
d5e0ce71
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_transform.c
View file @
e8bdf4f6
...
@@ -1427,6 +1427,16 @@ static ir_node *gen_Load(ia32_transform_env_t *env) {
...
@@ -1427,6 +1427,16 @@ static ir_node *gen_Load(ia32_transform_env_t *env) {
ia32_collect_Projs
(
env
->
irn
,
projs
,
pn_Load_max
);
ia32_collect_Projs
(
env
->
irn
,
projs
,
pn_Load_max
);
/*
check for special case: the loaded value might not be used (optimized, volatile, ...)
we add a Proj + Keep for volatile loads and ignore all other cases
*/
if
(
!
get_proj_for_pn
(
node
,
pn_Load_res
)
&&
get_Load_volatility
(
node
)
==
volatility_is_volatile
)
{
/* add a result proj and a Keep to produce a pseudo use */
ir_node
*
proj
=
new_r_Proj
(
env
->
irg
,
env
->
block
,
new_op
,
mode
,
pn_ia32_Load_res
);
be_new_Keep
(
arch_get_irn_reg_class
(
env
->
cg
->
arch_env
,
proj
,
-
1
),
env
->
irg
,
env
->
block
,
1
,
&
proj
);
}
/* address might be a constant (symconst or absolute address) */
/* address might be a constant (symconst or absolute address) */
if
(
is_ia32_Const
(
ptr
))
{
if
(
is_ia32_Const
(
ptr
))
{
lptr
=
noreg
;
lptr
=
noreg
;
...
@@ -1469,16 +1479,6 @@ static ir_node *gen_Load(ia32_transform_env_t *env) {
...
@@ -1469,16 +1479,6 @@ static ir_node *gen_Load(ia32_transform_env_t *env) {
set_ia32_am_flavour
(
new_op
,
am_flav
);
set_ia32_am_flavour
(
new_op
,
am_flav
);
set_ia32_ls_mode
(
new_op
,
mode
);
set_ia32_ls_mode
(
new_op
,
mode
);
/*
check for special case: the loaded value might not be used (optimized, volatile, ...)
we add a Proj + Keep for volatile loads and ignore all other cases
*/
if
(
!
get_proj_for_pn
(
node
,
pn_Load_res
)
&&
get_Load_volatility
(
node
)
==
volatility_is_volatile
)
{
/* add a result proj and a Keep to produce a pseudo use */
ir_node
*
proj
=
new_r_Proj
(
env
->
irg
,
env
->
block
,
new_op
,
mode
,
pn_ia32_Load_res
);
be_new_Keep
(
arch_get_irn_reg_class
(
env
->
cg
->
arch_env
,
proj
,
-
1
),
env
->
irg
,
env
->
block
,
1
,
&
proj
);
}
SET_IA32_ORIG_NODE
(
new_op
,
ia32_get_old_node_name
(
env
->
cg
,
env
->
irn
));
SET_IA32_ORIG_NODE
(
new_op
,
ia32_get_old_node_name
(
env
->
cg
,
env
->
irn
));
return
new_op
;
return
new_op
;
...
...
Write
Preview
Supports
Markdown
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