- foreach_ir_nodeset(nodes, node, iter) {
- if (arch_get_irn_register(arch_env, node) == reg) {
- ir_fprintf(stderr, " at node %+F\n", node);
- }
- }
+ if (arch_get_irn_reg_class_out(node) != regclass)
+ return;
+
+ reg = arch_get_irn_register(node);
+ if (reg->type & arch_register_type_virtual)
+ return;
+
+ reg_node = registers[reg->index];
+ if (reg_node != NULL && reg_node != node) {
+ ir_fprintf(stderr, "Verify warning: Register %s assigned more than once in block %+F(%s) (nodes %+F %+F)\n",
+ reg->name, get_nodes_block(node), get_irg_dump_name(irg),
+ node, reg_node);
+ problem_found = 1;
+ }
+
+ registers[reg->index] = node;
+}
+
+static void value_def(ir_node *node)
+{
+ const arch_register_t *reg;
+ ir_node *reg_node;
+
+ if (arch_get_irn_reg_class_out(node) != regclass)
+ return;
+
+ reg = arch_get_irn_register(node);
+ if (reg->type & arch_register_type_virtual)
+ return;
+
+ reg_node = registers[reg->index];
+
+ if (reg_node != node) {
+ ir_fprintf(stderr, "Verify warning: Node %+F not registered as value for Register %s (but %+F) in block %+F(%s)\n",
+ node, reg->name, reg_node, get_nodes_block(node), get_irg_dump_name(irg));
+ problem_found = 1;