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
4d7d203e
Commit
4d7d203e
authored
Mar 09, 2006
by
Sebastian Hack
Browse files
Fixed a bug
parent
0442a287
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/beabi.c
View file @
4d7d203e
...
...
@@ -1124,8 +1124,7 @@ be_abi_irg_t *be_abi_introduce(be_irg_t *birg)
{
be_abi_irg_t
*
env
=
malloc
(
sizeof
(
env
[
0
]));
int
i
;
ir_node
**
nodes
;
ir_node
*
dummy
;
pmap_entry
*
ent
;
env
->
isa
=
birg
->
main_env
->
arch_env
->
isa
;
...
...
@@ -1137,7 +1136,7 @@ be_abi_irg_t *be_abi_introduce(be_irg_t *birg)
env
->
birg
=
birg
;
env
->
dbg
=
firm_dbg_register
(
"firm.be.abi"
);
env
->
stack_phis
=
pset_new_ptr
(
16
);
env
->
init_sp
=
new_r_Unknown
(
birg
->
irg
,
env
->
isa
->
sp
->
reg_class
->
mode
);
env
->
init_sp
=
dummy
=
new_r_Unknown
(
birg
->
irg
,
env
->
isa
->
sp
->
reg_class
->
mode
);
obstack_init
(
&
env
->
obst
);
...
...
@@ -1147,30 +1146,17 @@ be_abi_irg_t *be_abi_introduce(be_irg_t *birg)
/* Lower all call nodes in the IRG. */
process_calls
(
env
);
#if 0
/* search for stack allocation nodes and record them */
irg_walk_graph(env->birg->irg, collect_alloca_walker, NULL, env);
obstack_ptr_grow(&env->obst, NULL);
nodes = obstack_finish(&env->obst);
/* If there are stack allocations in the irg, we need a frame pointer */
if(nodes[0] != NULL)
env->call->flags.bits.try_omit_fp = 0;
#endif
/* Process the IRG */
modify_irg
(
env
);
/* reroute the stack origin of the calls to the true stack origin. */
exchange
(
dummy
,
env
->
init_sp
);
/* Make some important node pointers survive the dead node elimination. */
survive_dce_register_irn
(
env
->
dce_survivor
,
&
env
->
init_sp
);
for
(
ent
=
pmap_first
(
env
->
regs
);
ent
;
ent
=
pmap_next
(
env
->
regs
))
survive_dce_register_irn
(
env
->
dce_survivor
,
(
ir_node
**
)
&
ent
->
value
);
/* Fix the alloca-style allocations */
#if 0
for(i = 0; nodes[i] != NULL; ++i)
implement_stack_alloc(env, nodes[i]);
#endif
arch_env_push_irn_handler
(
env
->
birg
->
main_env
->
arch_env
,
&
env
->
irn_handler
);
return
env
;
...
...
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