projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed debug output of unary x87 nodes
[libfirm]
/
ir
/
be
/
beabi.c
diff --git
a/ir/be/beabi.c
b/ir/be/beabi.c
index
44df17f
..
ef81cd9
100644
(file)
--- a/
ir/be/beabi.c
+++ b/
ir/be/beabi.c
@@
-1718,14
+1718,18
@@
be_abi_irg_t *be_abi_introduce(be_irg_t *birg)
restore_optimization_state(&state);
FIRM_DBG_REGISTER(env->dbg, "firm.be.abi");
restore_optimization_state(&state);
FIRM_DBG_REGISTER(env->dbg, "firm.be.abi");
- env->cb = env->call->cb->init(env->call, birg->main_env->arch_env, irg);
-
memcpy(&env->irn_handler, &abi_irn_handler, sizeof(abi_irn_handler));
env->irn_ops.impl = &abi_irn_ops;
/* Lower all call nodes in the IRG. */
process_calls(env);
memcpy(&env->irn_handler, &abi_irn_handler, sizeof(abi_irn_handler));
env->irn_ops.impl = &abi_irn_ops;
/* Lower all call nodes in the IRG. */
process_calls(env);
+ /*
+ Beware: init backend abi call object after processing calls,
+ otherwise some information might be not yet available.
+ */
+ env->cb = env->call->cb->init(env->call, birg->main_env->arch_env, irg);
+
/* Process the IRG */
modify_irg(env);
/* Process the IRG */
modify_irg(env);