summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-10 22:39:41 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-10 22:39:41 +0000
commitfee18fdb7de997d75883919cfed1183b3059317c (patch)
tree022c6381053d307b760d74ac01155b388300e834 /gcc/tree-ssa-alias.c
parent17519ba0dc05161d1dd4fba308eee373e9a9841b (diff)
downloadgcc-fee18fdb7de997d75883919cfed1183b3059317c.tar.gz
2006-12-10 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-alias.c (compact_name_tags): Use sort_tags_by_id. (tree_pointer_compare): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119714 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index b39553ea832..3d4fe56e654 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -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++)
{