summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beprefalloc.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-06-30 08:07:07 +0200
committerMatthias Braun <matze@braunis.de>2015-07-01 07:40:03 +0200
commitc15ec9596306be5ea62c087d37024f0cac05d490 (patch)
tree7f1194ce671d1c4d68c405ab86ba2382080bac58 /ir/be/beprefalloc.c
parent58b0168a2361d25b641eb0d5b8382ee75173b562 (diff)
bearch: rework should_be_same constraint
- Rename other_same field to should_be_same. - Remove arch_register_req_type_other_same, it's enough to see if the should_be_same field is not zero.
Diffstat (limited to 'ir/be/beprefalloc.c')
-rw-r--r--ir/be/beprefalloc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ir/be/beprefalloc.c b/ir/be/beprefalloc.c
index 725edb8..99a7c25 100644
--- a/ir/be/beprefalloc.c
+++ b/ir/be/beprefalloc.c
@@ -243,14 +243,14 @@ static void check_defs(ir_nodeset_t const *const live_nodes, float const weight,
give_penalties_for_limits(live_nodes, penalty, limited, node);
}
- if (arch_register_req_is(req, should_be_same)) {
+ if (req->should_be_same != 0) {
ir_node *insn = skip_Proj(node);
allocation_info_t *info = get_allocation_info(node);
int arity = get_irn_arity(insn);
- float factor = 1.0f / rbitset_popcount(&req->other_same, arity);
+ float factor = 1.0f / rbitset_popcount(&req->should_be_same, arity);
foreach_irn_in(insn, i, op) {
- if (!rbitset_is_set(&req->other_same, i))
+ if (!rbitset_is_set(&req->should_be_same, i))
continue;
/* if we the value at the should_be_same input doesn't die at the
@@ -326,13 +326,13 @@ static void analyze_block(ir_node *block, void *data)
static void congruence_def(ir_nodeset_t *const live_nodes, ir_node const *const node, arch_register_req_t const *const req)
{
/* should be same constraint? */
- if (arch_register_req_is(req, should_be_same)) {
+ if (req->should_be_same != 0) {
const ir_node *insn = skip_Proj_const(node);
unsigned node_idx = get_irn_idx(node);
node_idx = uf_find(congruence_classes, node_idx);
foreach_irn_in(insn, i, op) {
- if (!rbitset_is_set(&req->other_same, i))
+ if (!rbitset_is_set(&req->should_be_same, i))
continue;
int op_idx = get_irn_idx(op);
@@ -657,12 +657,12 @@ static void assign_reg(ir_node const *const block, ir_node *const node, arch_reg
/* give should_be_same boni */
allocation_info_t *info = get_allocation_info(node);
ir_node *in_node = skip_Proj(node);
- if (arch_register_req_is(req, should_be_same)) {
+ if (req->should_be_same != 0) {
float weight = (float)get_block_execfreq(block);
- assert(get_irn_arity(in_node) <= (int)sizeof(req->other_same) * 8);
+ assert(get_irn_arity(in_node) <= (int)sizeof(req->should_be_same) * 8);
foreach_irn_in(in_node, i, in) {
- if (!rbitset_is_set(&req->other_same, i))
+ if (!rbitset_is_set(&req->should_be_same, i))
continue;
const arch_register_t *reg = arch_get_irn_register(in);