Simplified the code and fixed a comment.
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 24 Feb 2011 22:36:40 +0000 (22:36 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sat, 26 Feb 2011 09:27:58 +0000 (10:27 +0100)
No functional change.

[r28460]

ir/opt/combo.c

index 6e76937..d48e849 100644 (file)
@@ -253,7 +253,7 @@ static int cmp_irn_opcode(const ir_node *a, const ir_node *b)
        }
 
        /*
-        * here, we already now that the nodes are identical except their
+        * here, we already know that the nodes are identical except their
         * attributes
         */
        if (a->op->ops.node_cmp_attr)
@@ -292,15 +292,13 @@ static void check_partition(const partition_t *T)
 static void check_opcode(const partition_t *Z)
 {
        node_t        *node;
-       const ir_node *repr;
-       int           first = 1;
+       const ir_node *repr = NULL;
 
        list_for_each_entry(node_t, node, &Z->Leader, node_list) {
                ir_node *irn = node->node;
 
-               if (first) {
-                       repr  = irn;
-                       first = 0;
+               if (repr == NULL) {
+                       repr = irn;
                } else {
                        assert(cmp_irn_opcode(repr, irn) == 0);
                }