projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a47d28b
)
Handle ignore nodes as operands of Phis (Unknowns for example)
author
Sebastian Hack
<hack@ipd.info.uni-karlsruhe.de>
Tue, 7 Aug 2007 15:24:14 +0000
(15:24 +0000)
committer
Sebastian Hack
<hack@ipd.info.uni-karlsruhe.de>
Tue, 7 Aug 2007 15:24:14 +0000
(15:24 +0000)
[r15495]
ir/be/bespillbelady2.c
patch
|
blob
|
history
diff --git
a/ir/be/bespillbelady2.c
b/ir/be/bespillbelady2.c
index
6551b1a
..
5240d3e
100644
(file)
--- a/
ir/be/bespillbelady2.c
+++ b/
ir/be/bespillbelady2.c
@@
-823,6
+823,7
@@
end:
static double can_bring_in(global_end_state_t *ges, ir_node *bl, ir_node *irn, double limit, int level)
{
static double can_bring_in(global_end_state_t *ges, ir_node *bl, ir_node *irn, double limit, int level)
{
+ belady_env_t *env = ges->env;
double glob_costs = HUGE_VAL;
DBG((dbg, DBG_GLOBAL, "\t%2Dcan bring in for %+F at block %+F\n", level, irn, bl));
double glob_costs = HUGE_VAL;
DBG((dbg, DBG_GLOBAL, "\t%2Dcan bring in for %+F at block %+F\n", level, irn, bl));
@@
-837,7
+838,16
@@
static double can_bring_in(global_end_state_t *ges, ir_node *bl, ir_node *irn, d
for (i = 0; i < n; ++i) {
ir_node *pr = get_Block_cfgpred_block(bl, i);
ir_node *op = is_local_phi(bl, irn) ? get_irn_n(irn, i) : irn;
for (i = 0; i < n; ++i) {
ir_node *pr = get_Block_cfgpred_block(bl, i);
ir_node *op = is_local_phi(bl, irn) ? get_irn_n(irn, i) : irn;
- double c = can_make_available_at_end(ges, pr, op, limit, level + 1);
+ double c;
+
+ /*
+ * there might by unknwons as operands of phis in that case
+ * we set the costs to zero, since they won't get spilled.
+ */
+ if (arch_irn_consider_in_reg_alloc(env->arch, env->cls, op))
+ c = can_make_available_at_end(ges, pr, op, limit, level + 1);
+ else
+ c = 0.0;
glob_costs += c;
glob_costs += c;