summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beinfo.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-09-11 17:28:11 +0200
committerMatthias Braun <matze@braunis.de>2014-09-15 11:27:28 +0200
commitbd9736888f2b4b950ffae396b9260446fad2a98b (patch)
tree15c36961c6665b3212ac71e88e3a0b1012bc6259 /ir/be/beinfo.c
parentef0dc78a681f0877a1da185685dd7c33d82c9093 (diff)
node_cmp_attr changed to node_attrs_equal and code cleaned up
Diffstat (limited to 'ir/be/beinfo.c')
-rw-r--r--ir/be/beinfo.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ir/be/beinfo.c b/ir/be/beinfo.c
index 677aba1..695e19f 100644
--- a/ir/be/beinfo.c
+++ b/ir/be/beinfo.c
@@ -78,26 +78,22 @@ static void new_phi_copy_attr(ir_graph *irg, const ir_node *old_node,
old_phi_copy_attr(irg, old_node, new_node);
}
-int be_nodes_equal(const ir_node *node1, const ir_node *node2)
+int attrs_equal_be_node(const ir_node *node1, const ir_node *node2)
{
const backend_info_t *info1 = be_get_info(node1);
const backend_info_t *info2 = be_get_info(node2);
size_t len = ARR_LEN(info1->out_infos);
- int arity = get_irn_arity(node1);
- int in;
- size_t i;
-
if (ARR_LEN(info2->out_infos) != len)
return false;
+ int arity = get_irn_arity(node1);
assert(arity == get_irn_arity(node2));
-
- for (in = 0; in < arity; ++in) {
+ for (int in = 0; in < arity; ++in) {
if (info1->in_reqs[in] != info2->in_reqs[in])
return false;
}
- for (i = 0; i < len; ++i) {
+ for (size_t i = 0; i < len; ++i) {
const reg_out_info_t *out1 = &info1->out_infos[i];
const reg_out_info_t *out2 = &info2->out_infos[i];
if (out1->reg != out2->reg)