Do not qsort() the entries of a Perm in lower_perm_node(), it is pointless.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 12 Oct 2008 14:27:05 +0000 (14:27 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 12 Oct 2008 14:27:05 +0000 (14:27 +0000)
[r22813]

ir/be/belower.c

index 1fc5176..f927aac 100644 (file)
@@ -96,17 +96,6 @@ typedef struct _perm_cycle_t {
        perm_type_t             type;        /**< type (CHAIN or CYCLE) */
 } perm_cycle_t;
 
-/** Compare the in registers of two register pairs. */
-static int compare_reg_pair(const void *a, const void *b) {
-       const reg_pair_t *pair_a = a;
-       const reg_pair_t *pair_b = b;
-
-       if (pair_a->in_reg->index > pair_b->in_reg->index)
-               return 1;
-       else
-               return -1;
-}
-
 /** returns the number register pairs marked as checked. */
 static int get_n_checked_pairs(reg_pair_t *pairs, int n) {
        int i, n_checked = 0;
@@ -329,9 +318,6 @@ static void lower_perm_node(ir_node *irn, void *walk_env)
                pair->checked  = 0;
        }
 
-       /* sort the register pairs by the indices of the in registers */
-       qsort(pairs, n, sizeof(pairs[0]), compare_reg_pair);
-
        /* Mark all equal pairs as checked, and exchange the OUT proj with the IN
         * node. */
        for (i = 0; i < n; i++) {