summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-31 14:07:29 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-31 14:07:29 +0000
commite3022db7ee7faeaced8afbfaa3d3edbc1c6098b3 (patch)
treee35d13b4ee94edc9550a7d68aaf4c9f58eb9c1b3 /gcc/omp-low.c
parent2aedc2ffdf2feaa3543eb052124627300a210c3c (diff)
downloadgcc-e3022db7ee7faeaced8afbfaa3d3edbc1c6098b3.tar.gz
2007-03-31 Richard Guenther <rguenther@suse.de>
* omp-low.c (splay-tree.h): Include. (lookup_decl): Replace splay-tree usage by pointer-map. (maybe_lookup_decl): Likewise. (new_omp_context): Likewise. (delete_omp_context): Likewise. * gimplify.c (splay-tree.h): Include. * tree-inline.c (insert_decl_map): Replace splay-tree usage by pointer-map. (remap_ssa_name): Likewise. (remap_decl): Likewise. (remap_type_1): Likewise. (remap_type): Likewise. (copy_body_r): Likewise. (expand_call_inline): Likewise. (clone_body): Likewise. (copy_tree_r): Likewise. (remap_save_expr): Likewise. (unsave_r): Likewise. (unsave_expr_now): Likewise. (tree_function_versioning): Likewise. (build_duplicate_type): Likewise. * tree-inline.h (pointer-set.h): Include instead of splay-tree.h. (struct copy_body_data): Replace splay-tree by pointer-map. * Makefile.in (TREE_INLINE_H): Depend on pointer-map.h, not $(SPLAY_TREE_H). (gimplify.o): Depend on $(SPLAY_TREE_H). (omp-low.p): Likewise. * optimize.c (maybe_clone_body): Replace splay-tree usage by pointer-map. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123381 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 1ced1eaa875..f176f9e4102 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -41,6 +41,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "tree-pass.h"
#include "ggc.h"
#include "except.h"
+#include "splay-tree.h"
/* Lowering of OpenMP parallel and workshare constructs proceeds in two
@@ -441,17 +442,17 @@ is_reference (tree decl)
static inline tree
lookup_decl (tree var, omp_context *ctx)
{
- splay_tree_node n;
- n = splay_tree_lookup (ctx->cb.decl_map, (splay_tree_key) var);
- return (tree) n->value;
+ tree *n;
+ n = (tree *) pointer_map_contains (ctx->cb.decl_map, var);
+ return *n;
}
static inline tree
maybe_lookup_decl (tree var, omp_context *ctx)
{
- splay_tree_node n;
- n = splay_tree_lookup (ctx->cb.decl_map, (splay_tree_key) var);
- return n ? (tree) n->value : NULL_TREE;
+ tree *n;
+ n = (tree *) pointer_map_contains (ctx->cb.decl_map, var);
+ return n ? *n : NULL_TREE;
}
static inline tree
@@ -844,7 +845,7 @@ new_omp_context (tree stmt, omp_context *outer_ctx)
ctx->depth = 1;
}
- ctx->cb.decl_map = splay_tree_new (splay_tree_compare_pointers, 0, 0);
+ ctx->cb.decl_map = pointer_map_create ();
return ctx;
}
@@ -857,7 +858,7 @@ delete_omp_context (splay_tree_value value)
{
omp_context *ctx = (omp_context *) value;
- splay_tree_delete (ctx->cb.decl_map);
+ pointer_map_destroy (ctx->cb.decl_map);
if (ctx->field_map)
splay_tree_delete (ctx->field_map);