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
8c7701b9
Commit
8c7701b9
authored
Jan 20, 2009
by
Michael Beck
Browse files
- check for peculiarity_description for inner functions
[r25283]
parent
ee284206
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ana/irmemory.c
View file @
8c7701b9
...
...
@@ -909,7 +909,7 @@ static ir_entity_usage determine_entity_usage(const ir_node *irn, ir_entity *ent
*/
static
void
analyse_irg_entity_usage
(
ir_graph
*
irg
)
{
ir_type
*
ft
=
get_irg_frame_type
(
irg
);
ir_node
*
irg_frame
,
*
args
,
*
arg
;
ir_node
*
irg_frame
;
int
i
,
j
,
k
,
static_link_arg
;
/* set initial state to not_taken, as this is the "smallest" state */
...
...
@@ -946,31 +946,34 @@ static void analyse_irg_entity_usage(ir_graph *irg) {
static_link_arg
=
0
;
for
(
i
=
get_class_n_members
(
ft
)
-
1
;
i
>=
0
;
--
i
)
{
ir_entity
*
ent
=
get_class_member
(
ft
,
i
);
ir_graph
*
inner_irg
;
ir_node
*
args
;
if
(
is_method_entity
(
ent
))
{
ir_graph
*
inner_irg
=
get_entity_irg
(
ent
);
ir_node
*
args
;
if
(
!
is_method_entity
(
ent
))
continue
;
if
(
get_entity_peculiarity
(
ent
)
==
peculiarity_description
)
continue
;
assure_irg_outs
(
inner_irg
);
args
=
get_irg_args
(
inner_irg
);
for
(
j
=
get_irn_n_outs
(
args
)
-
1
;
j
>=
0
;
--
j
)
{
ir_node
*
arg
=
get_irn_out
(
args
,
j
);
inner_irg
=
get_entity_irg
(
ent
);
assure_irg_outs
(
inner_irg
);
args
=
get_irg_args
(
inner_irg
);
for
(
j
=
get_irn_n_outs
(
args
)
-
1
;
j
>=
0
;
--
j
)
{
ir_node
*
arg
=
get_irn_out
(
args
,
j
);
if
(
get_Proj_proj
(
arg
)
==
static_link_arg
)
{
for
(
k
=
get_irn_n_outs
(
arg
)
-
1
;
k
>=
0
;
--
k
)
{
ir_node
*
succ
=
get_irn_out
(
arg
,
k
);
if
(
get_Proj_proj
(
arg
)
==
static_link_arg
)
{
for
(
k
=
get_irn_n_outs
(
arg
)
-
1
;
k
>=
0
;
--
k
)
{
ir_node
*
succ
=
get_irn_out
(
arg
,
k
);
if
(
is_Sel
(
succ
))
{
ir_entity
*
entity
=
get_Sel_entity
(
succ
);
if
(
is_Sel
(
succ
))
{
ir_entity
*
entity
=
get_Sel_entity
(
succ
);
if
(
get_entity_owner
(
entity
)
==
ft
)
{
/* found an access to the outer frame */
ir_entity_usage
flags
;
if
(
get_entity_owner
(
entity
)
==
ft
)
{
/* found an access to the outer frame */
ir_entity_usage
flags
;
flags
=
get_entity_usage
(
entity
);
flags
|=
determine_entity_usage
(
succ
,
entity
);
set_entity_usage
(
entity
,
flags
);
}
flags
=
get_entity_usage
(
entity
);
flags
|=
determine_entity_usage
(
succ
,
entity
);
set_entity_usage
(
entity
,
flags
);
}
}
}
...
...
ir/be/beabi.c
View file @
8c7701b9
...
...
@@ -1792,6 +1792,8 @@ static void fix_outer_variable_access(be_abi_irg_t *env, lower_frame_sels_env_t
if
(
!
is_method_entity
(
ent
))
continue
;
if
(
get_entity_peculiarity
(
ent
)
==
peculiarity_description
)
continue
;
/*
* FIXME: find the number of the static link parameter
...
...
@@ -2658,7 +2660,7 @@ void be_abi_fix_stack_bias(be_abi_irg_t *env)
for
(
i
=
get_class_n_members
(
frame_tp
)
-
1
;
i
>=
0
;
--
i
)
{
ir_entity
*
ent
=
get_class_member
(
frame_tp
,
i
);
if
(
is_method_entity
(
ent
))
{
if
(
is_method_entity
(
ent
)
&&
get_entity_peculiarity
(
ent
)
!=
peculiarity_description
)
{
ir_graph
*
irg
=
get_entity_irg
(
ent
);
irg_walk_graph
(
irg
,
NULL
,
lower_outer_frame_sels
,
env
);
...
...
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