summaryrefslogtreecommitdiffhomepage
path: root/ir/be/becopyilp2.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 01:23:03 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 09:27:58 +0200
commit97af4dbbcf80e9ab54daa9358115efa25ae7fd59 (patch)
treebb657e2cca25de6ada065e8f880195fbada3a0e9 /ir/be/becopyilp2.c
parent42040283e37d43e4f65fdc55615898e7c9f26e12 (diff)
Directly compare registers instead of the index of registers.
Diffstat (limited to 'ir/be/becopyilp2.c')
-rw-r--r--ir/be/becopyilp2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ir/be/becopyilp2.c b/ir/be/becopyilp2.c
index a74a70c..b5561cc 100644
--- a/ir/be/becopyilp2.c
+++ b/ir/be/becopyilp2.c
@@ -226,8 +226,8 @@ static void build_affinity_cstr(ilp_env_t const *const ienv)
/* for all optimization units */
list_for_each_entry(unit_t, curr, &ienv->co->units, units) {
- ir_node *const root = curr->nodes[0];
- unsigned const root_col = get_irn_col(root);
+ ir_node *const root = curr->nodes[0];
+ arch_register_t const *const root_reg = arch_get_irn_register(root);
for (int i = 1; i < curr->node_count; ++i) {
ir_node *const arg = curr->nodes[i];
char buf[32];
@@ -235,7 +235,7 @@ static void build_affinity_cstr(ilp_env_t const *const ienv)
/* add a new affinity variable */
make_affinity_var_name(buf, sizeof(buf), arg, root);
int const y_idx = lpp_add_var(lp, buf, lpp_binary, curr->costs[i]);
- double const val = root_col == get_irn_col(arg) ? 0.0 : 1.0;
+ double const val = root_reg == arch_get_irn_register(arg) ? 0.0 : 1.0;
lpp_set_start_value(lp, y_idx, val);
/* add constraints relating the affinity var to the color vars */