tree-streamer.c (streamer_tree_cache_get): Move ...
authorRichard Guenther <rguenther@suse.de>
Tue, 9 Oct 2012 13:34:54 +0000 (13:34 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 9 Oct 2012 13:34:54 +0000 (13:34 +0000)
2012-10-09  Richard Guenther  <rguenther@suse.de>

* tree-streamer.c (streamer_tree_cache_get): Move ...
* tree-streamer.h (streamer_tree_cache_get): ... here as inline.

From-SVN: r192252

gcc/ChangeLog
gcc/tree-streamer.c
gcc/tree-streamer.h

index 67e4a64..c32e666 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-09  Richard Guenther  <rguenther@suse.de>
+
+       * tree-streamer.c (streamer_tree_cache_get): Move ...
+       * tree-streamer.h (streamer_tree_cache_get): ... here as inline.
+
 2012-10-09  Jan Hubicka  <jh@suse.cz>
 
        * loop-unroll.c (unroll_loop_constant_iterations): Add
index f7c1517..1f4fe96 100644 (file)
@@ -232,20 +232,6 @@ streamer_tree_cache_lookup (struct streamer_tree_cache_d *cache, tree t,
 }
 
 
-/* Return the tree node at slot IX in CACHE.  */
-
-tree
-streamer_tree_cache_get (struct streamer_tree_cache_d *cache, unsigned ix)
-{
-  gcc_assert (cache);
-
-  /* Make sure we're not requesting something we don't have.  */
-  gcc_assert (ix < VEC_length (tree, cache->nodes));
-
-  return VEC_index (tree, cache->nodes, ix);
-}
-
-
 /* Record NODE in CACHE.  */
 
 static void
index 0631330..be0b1a3 100644 (file)
@@ -93,8 +93,16 @@ bool streamer_tree_cache_insert_at (struct streamer_tree_cache_d *, tree,
 void streamer_tree_cache_append (struct streamer_tree_cache_d *, tree);
 bool streamer_tree_cache_lookup (struct streamer_tree_cache_d *, tree,
                                 unsigned *);
-tree streamer_tree_cache_get (struct streamer_tree_cache_d *, unsigned);
 struct streamer_tree_cache_d *streamer_tree_cache_create (void);
 void streamer_tree_cache_delete (struct streamer_tree_cache_d *);
 
+/* Return the tree node at slot IX in CACHE.  */
+
+static inline tree
+streamer_tree_cache_get (struct streamer_tree_cache_d *cache, unsigned ix)
+{
+  return VEC_index (tree, cache->nodes, ix);
+}
+
+
 #endif  /* GCC_TREE_STREAMER_H  */