summaryrefslogtreecommitdiff
path: root/gcc/tree-streamer.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-12 16:42:13 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-12 16:42:13 +0000
commit7f3857848224929268239eaff4544a32eef5de94 (patch)
treeef2a7dfd0af1b4be822dcf83bf3264d9f4d97d0c /gcc/tree-streamer.c
parentbd021c1c5798b3cda3e5eb4ef653281cbced5c18 (diff)
* data-streamer.h (streamer_write_zero): Rename from output_zero.
(streamer_write_uhwi): Rename from lto_output_uleb128. (streamer_write_hwi): Rename from output_sleb128. (streamer_write_string): Rename from lto_output_string. (streamer_string_index): Rename from lto_string_index. (streamer_write_string_with_length): Rename from lto_output_string_with_length. (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream. (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream. (streamer_read_string): Rename from lto_input_string. (streamer_read_indexed_string): Rename from input_string_internal. (streamer_read_uhwi): Rename from lto_input_uleb128. (streamer_read_hwi): Rename from lto_input_sleb128. (streamer_write_hwi_in_range): Rename from lto_output_int_in_range. (streamer_read_hwi_in_range): Rename from lto_input_int_in_range. (streamer_write_enum): Rename from lto_output_enum. (streamer_read_enum): Rename from lto_input_enum. (streamer_write_record_start): Rename from output_record_start. (streamer_read_record_start): Rename from input_record_start. (streamer_write_bitpack): Rename from lto_output_bitpack. (streamer_read_bitpack): Rename from lto_input_bitpack. (streamer_write_char_stream): Rename from lto_output_1_stream. (streamer_read_uchar): Rename from lto_input_1_unsigned. * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d. (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p. (streamer_read_string_cst): Rename from input_string_cst. (streamer_read_chain): Rename from lto_input_chain. (streamer_alloc_tree): Rename from lto_materialize_tree. (streamer_read_tree_body): Rename from lto_input_tree_pointers. (streamer_get_pickled_tree): Rename from lto_get_pickled_tree. (streamer_get_builtin_tree): Rename from lto_get_builtin_tree. (streamer_read_integer_cst): Rename from lto_input_integer_cst. (streamer_read_tree_bitfields): Rename from tree_read_bitfields. (streamer_write_chain): Rename from lto_output_chain. (streamer_write_tree_header): Rename from lto_output_tree_header. (streamer_pack_tree_bitfields): Rename from pack_value_fields. (streamer_write_tree_body): Rename from lto_output_tree_pointers. (streamer_write_integer_cst): Rename from lto_output_integer_cst. (streamer_write_builtin): Rename from lto_output_builtin_tree. (streamer_check_handled_ts_structures): Rename from check_handled_ts_structures. (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert. (streamer_tree_cache_insert_at): Rename from lto_streamer_cache_insert_at. (streamer_tree_cache_append): Rename from lto_streamer_cache_append. (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup. (streamer_tree_cache_get): Rename from lto_streamer_cache_get. (streamer_tree_cache_create): Rename from lto_streamer_cache_create. (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete. * tree-streamer-out.c (write_string_cst): Rename from output_string_cst. (write_identifier): Rename from output_identifier. (write_ts_common_tree_pointers): Rename from lto_output_ts_common_tree_pointers. (write_ts_vector_tree_pointers): Rename from lto_output_ts_vector_tree_pointers. (write_ts_complex_tree_pointers): Rename from lto_output_ts_complex_tree_pointers. (write_ts_decl_minimal_tree_pointers): Rename from lto_output_ts_decl_minimal_tree_pointers. (write_ts_decl_common_tree_pointers): Rename from lto_output_ts_decl_common_tree_pointers. (write_ts_decl_non_common_tree_pointers): Rename from lto_output_ts_decl_non_common_tree_pointers. (write_ts_decl_with_vis_tree_pointers): Rename from lto_output_ts_decl_with_vis_tree_pointers. (write_ts_field_decl_tree_pointers): Rename from lto_output_ts_field_decl_tree_pointers. (write_ts_function_decl_tree_pointers): Rename from lto_output_ts_function_decl_tree_pointers. (write_ts_type_common_tree_pointers): Rename from lto_output_ts_type_common_tree_pointers. (write_ts_type_non_common_tree_pointers): Rename from lto_output_ts_type_non_common_tree_pointers. (write_ts_list_tree_pointers): Rename from lto_output_ts_list_tree_pointers. (write_ts_vec_tree_pointers): Rename from lto_output_ts_vec_tree_pointers. (write_ts_exp_tree_pointers): Rename from lto_output_ts_exp_tree_pointers. (write_ts_block_tree_pointers): Rename from lto_output_ts_block_tree_pointers. (write_ts_binfo_tree_pointers): Rename from lto_output_ts_binfo_tree_pointers. (write_ts_constructor_tree_pointers): Rename from lto_output_ts_constructor_tree_pointers. (write_ts_target_option): Rename from lto_output_ts_target_option. (write_ts_translation_unit_decl_tree_pointers): Rename from lto_output_ts_translation_unit_decl_tree_pointers. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Rename from lto_streamer_cache_add_to_node_array. (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1. (record_common_node): Rename from lto_record_common_node. * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward declarations. * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused function. * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove unused function. * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H. (ipa-reference.o): Likewise. * lto-section-out.c: Include data-streamer.h. * ipa-reference.c: Include data-streamer.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177704 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-streamer.c')
-rw-r--r--gcc/tree-streamer.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/gcc/tree-streamer.c b/gcc/tree-streamer.c
index 0517441013ae..94d540b59843 100644
--- a/gcc/tree-streamer.c
+++ b/gcc/tree-streamer.c
@@ -26,12 +26,12 @@ along with GCC; see the file COPYING3. If not see
#include "streamer-hooks.h"
#include "tree-streamer.h"
-/* Check that all the TS_* structures handled by the lto_output_* and
- lto_input_* routines are exactly ALL the structures defined in
+/* Check that all the TS_* structures handled by the streamer_write_* and
+ streamer_read_* routines are exactly ALL the structures defined in
treestruct.def. */
void
-check_handled_ts_structures (void)
+streamer_check_handled_ts_structures (void)
{
bool handled_p[LAST_TS_ENUM];
unsigned i;
@@ -87,12 +87,12 @@ check_handled_ts_structures (void)
}
-/* Helper for lto_streamer_cache_insert_1. Add T to CACHE->NODES at
+/* Helper for streamer_tree_cache_insert_1. Add T to CACHE->NODES at
slot IX. */
static void
-lto_streamer_cache_add_to_node_array (struct lto_streamer_cache_d *cache,
- unsigned ix, tree t)
+streamer_tree_cache_add_to_node_array (struct streamer_tree_cache_d *cache,
+ unsigned ix, tree t)
{
/* Make sure we're either replacing an old element or
appending consecutively. */
@@ -105,8 +105,8 @@ lto_streamer_cache_add_to_node_array (struct lto_streamer_cache_d *cache,
}
-/* Helper for lto_streamer_cache_insert and lto_streamer_cache_insert_at.
- CACHE, T, and IX_P are as in lto_streamer_cache_insert.
+/* Helper for streamer_tree_cache_insert and streamer_tree_cache_insert_at.
+ CACHE, T, and IX_P are as in streamer_tree_cache_insert.
If INSERT_AT_NEXT_SLOT_P is true, T is inserted at the next available
slot in the cache. Otherwise, T is inserted at the position indicated
@@ -116,9 +116,9 @@ lto_streamer_cache_add_to_node_array (struct lto_streamer_cache_d *cache,
return false. */
static bool
-lto_streamer_cache_insert_1 (struct lto_streamer_cache_d *cache,
- tree t, unsigned *ix_p,
- bool insert_at_next_slot_p)
+streamer_tree_cache_insert_1 (struct streamer_tree_cache_d *cache,
+ tree t, unsigned *ix_p,
+ bool insert_at_next_slot_p)
{
void **slot;
unsigned ix;
@@ -136,7 +136,7 @@ lto_streamer_cache_insert_1 (struct lto_streamer_cache_d *cache,
ix = *ix_p;
*slot = (void *)(size_t) (ix + 1);
- lto_streamer_cache_add_to_node_array (cache, ix, t);
+ streamer_tree_cache_add_to_node_array (cache, ix, t);
/* Indicate that the item was not present in the cache. */
existed_p = false;
@@ -151,7 +151,7 @@ lto_streamer_cache_insert_1 (struct lto_streamer_cache_d *cache,
location, and ENTRY->TO does not match *IX_P, add T to
the requested location slot. */
ix = *ix_p;
- lto_streamer_cache_add_to_node_array (cache, ix, t);
+ streamer_tree_cache_add_to_node_array (cache, ix, t);
}
/* Indicate that T was already in the cache. */
@@ -172,10 +172,10 @@ lto_streamer_cache_insert_1 (struct lto_streamer_cache_d *cache,
T has been stored. */
bool
-lto_streamer_cache_insert (struct lto_streamer_cache_d *cache, tree t,
- unsigned *ix_p)
+streamer_tree_cache_insert (struct streamer_tree_cache_d *cache, tree t,
+ unsigned *ix_p)
{
- return lto_streamer_cache_insert_1 (cache, t, ix_p, true);
+ return streamer_tree_cache_insert_1 (cache, t, ix_p, true);
}
@@ -183,20 +183,20 @@ lto_streamer_cache_insert (struct lto_streamer_cache_d *cache, tree t,
existed in the cache return true. Otherwise, return false. */
bool
-lto_streamer_cache_insert_at (struct lto_streamer_cache_d *cache,
- tree t, unsigned ix)
+streamer_tree_cache_insert_at (struct streamer_tree_cache_d *cache,
+ tree t, unsigned ix)
{
- return lto_streamer_cache_insert_1 (cache, t, &ix, false);
+ return streamer_tree_cache_insert_1 (cache, t, &ix, false);
}
/* Appends tree node T to CACHE, even if T already existed in it. */
void
-lto_streamer_cache_append (struct lto_streamer_cache_d *cache, tree t)
+streamer_tree_cache_append (struct streamer_tree_cache_d *cache, tree t)
{
unsigned ix = VEC_length (tree, cache->nodes);
- lto_streamer_cache_insert_1 (cache, t, &ix, false);
+ streamer_tree_cache_insert_1 (cache, t, &ix, false);
}
/* Return true if tree node T exists in CACHE, otherwise false. If IX_P is
@@ -204,8 +204,8 @@ lto_streamer_cache_append (struct lto_streamer_cache_d *cache, tree t)
((unsigned)-1 if T is not found). */
bool
-lto_streamer_cache_lookup (struct lto_streamer_cache_d *cache, tree t,
- unsigned *ix_p)
+streamer_tree_cache_lookup (struct streamer_tree_cache_d *cache, tree t,
+ unsigned *ix_p)
{
void **slot;
bool retval;
@@ -235,7 +235,7 @@ lto_streamer_cache_lookup (struct lto_streamer_cache_d *cache, tree t,
/* Return the tree node at slot IX in CACHE. */
tree
-lto_streamer_cache_get (struct lto_streamer_cache_d *cache, unsigned ix)
+streamer_tree_cache_get (struct streamer_tree_cache_d *cache, unsigned ix)
{
gcc_assert (cache);
@@ -249,7 +249,7 @@ lto_streamer_cache_get (struct lto_streamer_cache_d *cache, unsigned ix)
/* Record NODE in CACHE. */
static void
-lto_record_common_node (struct lto_streamer_cache_d *cache, tree node)
+record_common_node (struct streamer_tree_cache_d *cache, tree node)
{
/* We have to make sure to fill exactly the same number of
elements for all frontends. That can include NULL trees.
@@ -260,12 +260,12 @@ lto_record_common_node (struct lto_streamer_cache_d *cache, tree node)
if (!node)
node = error_mark_node;
- lto_streamer_cache_append (cache, node);
+ streamer_tree_cache_append (cache, node);
if (POINTER_TYPE_P (node)
|| TREE_CODE (node) == COMPLEX_TYPE
|| TREE_CODE (node) == ARRAY_TYPE)
- lto_record_common_node (cache, TREE_TYPE (node));
+ record_common_node (cache, TREE_TYPE (node));
else if (TREE_CODE (node) == RECORD_TYPE)
{
/* The FIELD_DECLs of structures should be shared, so that every
@@ -275,7 +275,7 @@ lto_record_common_node (struct lto_streamer_cache_d *cache, tree node)
nonoverlapping_component_refs_p). */
tree f;
for (f = TYPE_FIELDS (node); f; f = TREE_CHAIN (f))
- lto_record_common_node (cache, f);
+ record_common_node (cache, f);
}
}
@@ -284,35 +284,35 @@ lto_record_common_node (struct lto_streamer_cache_d *cache, tree node)
properly according to the gimple type table. */
static void
-preload_common_nodes (struct lto_streamer_cache_d *cache)
+preload_common_nodes (struct streamer_tree_cache_d *cache)
{
unsigned i;
for (i = 0; i < itk_none; i++)
/* Skip itk_char. char_type_node is dependent on -f[un]signed-char. */
if (i != itk_char)
- lto_record_common_node (cache, integer_types[i]);
+ record_common_node (cache, integer_types[i]);
for (i = 0; i < TYPE_KIND_LAST; i++)
- lto_record_common_node (cache, sizetype_tab[i]);
+ record_common_node (cache, sizetype_tab[i]);
for (i = 0; i < TI_MAX; i++)
/* Skip boolean type and constants, they are frontend dependent. */
if (i != TI_BOOLEAN_TYPE
&& i != TI_BOOLEAN_FALSE
&& i != TI_BOOLEAN_TRUE)
- lto_record_common_node (cache, global_trees[i]);
+ record_common_node (cache, global_trees[i]);
}
/* Create a cache of pickled nodes. */
-struct lto_streamer_cache_d *
-lto_streamer_cache_create (void)
+struct streamer_tree_cache_d *
+streamer_tree_cache_create (void)
{
- struct lto_streamer_cache_d *cache;
+ struct streamer_tree_cache_d *cache;
- cache = XCNEW (struct lto_streamer_cache_d);
+ cache = XCNEW (struct streamer_tree_cache_d);
cache->node_map = pointer_map_create ();
@@ -328,7 +328,7 @@ lto_streamer_cache_create (void)
/* Delete the streamer cache C. */
void
-lto_streamer_cache_delete (struct lto_streamer_cache_d *c)
+streamer_tree_cache_delete (struct streamer_tree_cache_d *c)
{
if (c == NULL)
return;