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
f1856f43
Commit
f1856f43
authored
Oct 30, 2005
by
Michael Beck
Browse files
copy_const_value() now takes a dbg_info argument
[r6832]
parent
79fec3d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/ana/cgana.c
View file @
f1856f43
...
...
@@ -180,7 +180,8 @@ static void sel_methods_walker(ir_node * node, void *env) {
/* Call standard optimizations */
if
(
get_irn_op
(
node
)
==
op_Sel
)
{
ir_node
*
new_node
=
optimize_in_place
(
node
);
if
(
node
!=
new_node
)
exchange
(
node
,
new_node
);
if
(
node
!=
new_node
)
exchange
(
node
,
new_node
);
}
/* replace SymConst(name)-operations by SymConst(ent) */
...
...
@@ -229,7 +230,7 @@ static void sel_methods_walker(ir_node * node, void *env) {
set_irg_current_block
(
current_ir_graph
,
get_nodes_block
(
node
));
assert
(
get_entity_peculiarity
(
get_SymConst_entity
(
get_atomic_ent_value
(
arr
[
0
])))
==
peculiarity_existent
);
new_node
=
copy_const_value
(
get_atomic_ent_value
(
arr
[
0
]));
new_node
=
copy_const_value
(
get_irn_dbg_info
(
node
),
get_atomic_ent_value
(
arr
[
0
]));
DBG_OPT_POLY
(
node
,
new_node
);
exchange
(
node
,
new_node
);
}
...
...
ir/opt/ldstopt.c
View file @
f1856f43
...
...
@@ -514,7 +514,7 @@ static unsigned optimize_load(ir_node *load)
/* no result :-) */
if
(
info
->
projs
[
pn_Load_res
])
{
if
(
is_atomic_entity
(
ent
))
{
ir_node
*
c
=
copy_const_value
(
get_atomic_ent_value
(
ent
));
ir_node
*
c
=
copy_const_value
(
get_irn_dbg_info
(
load
),
get_atomic_ent_value
(
ent
));
DBG_OPT_RC
(
load
,
c
);
exchange
(
info
->
projs
[
pn_Load_res
],
c
);
...
...
@@ -552,7 +552,7 @@ static unsigned optimize_load(ir_node *load)
res
|=
DF_CHANGED
;
}
if
(
info
->
projs
[
pn_Load_res
])
{
exchange
(
info
->
projs
[
pn_Load_res
],
copy_const_value
(
c
));
exchange
(
info
->
projs
[
pn_Load_res
],
copy_const_value
(
get_irn_dbg_info
(
load
),
c
));
return
res
|
DF_CHANGED
;
}
}
...
...
ir/opt/opt_polymorphy.c
View file @
f1856f43
...
...
@@ -63,7 +63,7 @@ ir_node *transform_node_Sel(ir_node *node)
}
else
{
ir_node
*
rem_block
=
get_cur_block
();
set_cur_block
(
get_nodes_block
(
node
));
new_node
=
copy_const_value
(
get_atomic_ent_value
(
ent
));
new_node
=
copy_const_value
(
get_irn_dbg_info
(
node
),
get_atomic_ent_value
(
ent
));
set_cur_block
(
rem_block
);
DBG_OPT_POLY
(
node
,
new_node
);
}
...
...
@@ -86,7 +86,7 @@ ir_node *transform_node_Sel(ir_node *node)
rem_block
=
get_cur_block
();
set_cur_block
(
get_nodes_block
(
node
));
new_node
=
copy_const_value
(
get_atomic_ent_value
(
called_ent
));
new_node
=
copy_const_value
(
get_irn_dbg_info
(
node
),
get_atomic_ent_value
(
called_ent
));
set_cur_block
(
rem_block
);
DBG_OPT_POLY
(
node
,
new_node
);
...
...
@@ -125,7 +125,7 @@ ir_node *transform_node_Load(ir_node *n)
/* If the entity is a leave in the inheritance tree,
we can replace the Sel by a constant. */
if
((
get_irp_phase_state
()
!=
phase_building
)
&&
(
get_entity_n_overwrittenby
(
ent
)
==
0
))
{
new_node
=
copy_const_value
(
get_atomic_ent_value
(
ent
));
new_node
=
copy_const_value
(
get_irn_dbg_info
(
n
),
get_atomic_ent_value
(
ent
));
DBG_OPT_POLY
(
field_ptr
,
new_node
);
return
new_node
;
...
...
@@ -143,7 +143,7 @@ ir_node *transform_node_Load(ir_node *n)
/* called_ent may not be description: has no Address/Const to Call! */
assert
(
get_entity_peculiarity
(
loaded_ent
)
!=
peculiarity_description
);
new_node
=
copy_const_value
(
get_atomic_ent_value
(
loaded_ent
));
new_node
=
copy_const_value
(
get_irn_dbg_info
(
n
),
get_atomic_ent_value
(
loaded_ent
));
DBG_OPT_POLY
(
field_ptr
,
new_node
);
return
new_node
;
...
...
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