diff options
author | fche <fche@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 22:30:53 +0000 |
---|---|---|
committer | fche <fche@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-29 22:30:53 +0000 |
commit | 9d6f56533d2775a66d64d2fa4daebfe53e2fe2b7 (patch) | |
tree | 5ea0f59fb7a56b8a63681ee82cdcb3dc5e366b6d /libmudflap/mf-runtime.c | |
parent | 2ff27890aa2a8ba7fe930013514db65706a1c27c (diff) | |
download | gcc-9d6f56533d2775a66d64d2fa4daebfe53e2fe2b7.tar.gz |
2004-06-29 Frank Ch. Eigler <fche@redhat.com>
Splay tree implementation fork.
* splay-tree.c, splay-tree.h: Copied & modified from libiberty.
Use hard-coded comparison function for uintptr_t. Remove key/value
deallocation logic. Cache last splayed key for consecutive lookups.
* Makefile.am, Makefile.in: Use them, don't link to them.
* mf-runtime.c (__mf_object_tree): Adapt to simpler splay_tree_new.
(__mf_find_objects2): Flip successor/predecessor search sequence.
* ansidecl.h, libiberty.h: Removed dummy files.
2004-06-29 Nick Clifton <nickc@redhat.com>
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83879 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/mf-runtime.c')
-rw-r--r-- | libmudflap/mf-runtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmudflap/mf-runtime.c b/libmudflap/mf-runtime.c index c1f0a6a4828..f1cd0a22db7 100644 --- a/libmudflap/mf-runtime.c +++ b/libmudflap/mf-runtime.c @@ -610,7 +610,7 @@ __mf_object_tree (int type) static splay_tree trees [__MF_TYPE_MAX+1]; assert (type >= 0 && type <= __MF_TYPE_MAX); if (UNLIKELY (trees[type] == NULL)) - trees[type] = splay_tree_new (splay_tree_compare_pointers, NULL, NULL); + trees[type] = splay_tree_new (); return trees[type]; } @@ -1390,7 +1390,7 @@ __mf_find_objects2 (uintptr_t ptr_low, uintptr_t ptr_high, { __mf_object_t *obj; - n = (direction == 0 ? splay_tree_predecessor (t, k) : splay_tree_successor (t, k)); + n = (direction == 0 ? splay_tree_successor (t, k) : splay_tree_predecessor (t, k)); if (n == NULL) break; obj = (__mf_object_t *) n->value; |