+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.
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
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++)
{
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");