tree-ssa-alias.c (compact_name_tags): Use sort_tags_by_id.
authorDaniel Berlin <dberlin@dberlin.org>
Sun, 10 Dec 2006 22:39:41 +0000 (22:39 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Sun, 10 Dec 2006 22:39:41 +0000 (22:39 +0000)
2006-12-10  Daniel Berlin  <dberlin@dberlin.org>

* tree-ssa-alias.c (compact_name_tags): Use sort_tags_by_id.
(tree_pointer_compare): Remove.

From-SVN: r119714

gcc/ChangeLog
gcc/tree-ssa-alias.c
gcc/tree-ssa-ter.c

index cabbcd17280614deee62ad22bb50753dd065f2c6..cef245c68a16b2c6826f4bb4d13ae992b207aab5 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-10  Daniel Berlin  <dberlin@dberlin.org>
+
+       * tree-ssa-alias.c (compact_name_tags): Use sort_tags_by_id.
+       (tree_pointer_compare): Remove.
+
 2006-12-10  Zdenek Dvorak <dvorakz@suse.cz>
 
        * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop.
index b39553ea832f4da9f43f0441f0979870b6df0aac..3d4fe56e654a6a0936547a96ea7e4e2d500ccd10 100644 (file)
@@ -1293,19 +1293,6 @@ group_aliases_into (tree tag, bitmap tag_aliases, struct alias_info *ai)
   tag_ann->may_aliases = NULL;
 }
 
-/* Simple comparison function for qsort that sorts based on pointer
-   address.  */
-
-static int
-tree_pointer_compare (const void *pa, const void *pb)
-{
-  const tree a = *((const tree *)pa);
-  const tree b = *((const tree *)pb);
-  
-  return b - a;
-}
-
-
 /* Replacing may aliases in name tags during grouping can up with the
    same SMT multiple times in the may_alias list.  It's quicker to
    just remove them post-hoc than it is to avoid them during
@@ -1333,8 +1320,9 @@ compact_name_tags (void)
          if (VEC_length (tree, aliases) > 1)
            {
              bool changed = false;
-             qsort (VEC_address (tree, aliases), VEC_length (tree, aliases),
-                    sizeof (tree), tree_pointer_compare);
+             qsort (VEC_address (tree, aliases), 
+                    VEC_length (tree, aliases),
+                    sizeof (tree), sort_tags_by_id);
              
              for (i = 0; VEC_iterate (tree, aliases, i, alias); i++)
                {
index 78f8a121f0993efca89032e5c47a8da054c80bc7..513541d614718ea38ed980af96286bf54ff53e82 100644 (file)
@@ -672,7 +672,8 @@ dump_replaceable_exprs (FILE *f, tree *expr)
        gcc_assert (var != NULL_TREE);
        print_generic_expr (f, var, TDF_SLIM);
        fprintf (f, " replace with --> ");
-       print_generic_expr (f, TREE_OPERAND (stmt, 1), TDF_SLIM);
+       print_generic_expr (f, GENERIC_TREE_OPERAND (stmt, 1),
+                           TDF_SLIM);
        fprintf (f, "\n");
       }
   fprintf (f, "\n");