GCC Middle and Back End API Reference
tree-streamer.h File Reference

Go to the source code of this file.

Data Structures

struct  streamer_tree_cache_d

Functions

static bool streamer_handle_as_builtin_p ()
tree streamer_read_string_cst (struct data_in *, struct lto_input_block *)
tree streamer_read_chain (struct lto_input_block *, struct data_in *)
tree streamer_alloc_tree (struct lto_input_block *, struct data_in *, enum LTO_tags)
void streamer_read_tree_body (struct lto_input_block *, struct data_in *, tree)
tree streamer_get_pickled_tree (struct lto_input_block *, struct data_in *)
tree streamer_get_builtin_tree (struct lto_input_block *, struct data_in *)
struct bitpack_d streamer_read_tree_bitfields (struct lto_input_block *, struct data_in *, tree)
void streamer_write_string_cst (struct output_block *, struct lto_output_stream *, tree)
void streamer_write_chain (struct output_block *, tree, bool)
void streamer_write_tree_header (struct output_block *, tree)
void streamer_pack_tree_bitfields (struct output_block *, struct bitpack_d *, tree)
void streamer_write_tree_body (struct output_block *, tree, bool)
void streamer_write_integer_cst (struct output_block *, tree, bool)
void streamer_write_builtin (struct output_block *, tree)
void streamer_check_handled_ts_structures (void)
bool streamer_tree_cache_insert (struct streamer_tree_cache_d *, tree, hashval_t, unsigned *)
void streamer_tree_cache_replace_tree (struct streamer_tree_cache_d *, tree, unsigned)
void streamer_tree_cache_append (struct streamer_tree_cache_d *, tree, hashval_t)
bool streamer_tree_cache_lookup (struct streamer_tree_cache_d *, tree, unsigned *)
struct streamer_tree_cache_dstreamer_tree_cache_create (bool, bool)
void streamer_tree_cache_delete (struct streamer_tree_cache_d *)
static tree streamer_tree_cache_get_tree ()
static hashval_t streamer_tree_cache_get_hash ()

Function Documentation

tree streamer_alloc_tree ( struct lto_input_block ib,
struct data_in data_in,
enum LTO_tags  tag 
)
Materialize a new tree from input block IB using descriptors in
   DATA_IN.  The code for the new tree should match TAG.  Store in
   *IX_P the index into the reader cache where the new tree is stored.   

References HOST_WIDE_INT, HOST_WIDEST_INT, input_identifier(), len, lto_orig_address_map(), lto_tag_to_tree_code(), streamer_read_hwi(), streamer_read_string_cst(), and streamer_read_uhwi().

Referenced by lto_input_scc(), and lto_read_tree().

void streamer_check_handled_ts_structures ( void  )
In tree-streamer.c.   
@verbatim Miscellaneous utilities for tree streaming.  Things that are used

in both input and output are here.

Copyright (C) 2011-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi.nosp@m.llo@.nosp@m.googl.nosp@m.e.co.nosp@m.m

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

Check that all the TS_* structures handled by the streamer_write_* and
   streamer_read_* routines are exactly ALL the structures defined in
   treestruct.def.   

References LAST_TS_ENUM, and memset().

Referenced by lto_streamer_init().

tree streamer_get_builtin_tree ( struct lto_input_block ,
struct data_in  
)
tree streamer_get_pickled_tree ( struct lto_input_block ,
struct data_in  
)
static bool streamer_handle_as_builtin_p ( )
inlinestatic
Return true if tree node EXPR should be streamed as a builtin.  For
   these nodes, we just emit the class and function code.   

References BUILT_IN_MD, and BUILT_IN_NORMAL.

Referenced by DFS_write_tree(), lto_output_tree_1(), lto_read_tree_1(), pack_ts_function_decl_value_fields(), and streamer_write_builtin().

tree streamer_read_chain ( struct lto_input_block ,
struct data_in  
)
tree streamer_read_string_cst ( struct data_in ,
struct lto_input_block  
)
In tree-streamer-in.c.   
struct bitpack_d streamer_read_tree_bitfields ( struct lto_input_block ib,
struct data_in data_in,
tree  expr 
)
read
Read all the language-independent bitfield values for EXPR from IB.
   Return the partially unpacked bitpack so the caller can unpack any other
   bitfield values that the writer may have written.   

References bp_unpack_value(), lto_tag_check(), lto_tree_code_to_tag(), streamer_read_bitpack(), and unpack_value_fields().

Referenced by lto_read_tree_1().

void streamer_tree_cache_append ( struct streamer_tree_cache_d cache,
tree  t,
hashval_t  hash 
)
struct streamer_tree_cache_d* streamer_tree_cache_create ( bool  ,
bool   
)
read
void streamer_tree_cache_delete ( struct streamer_tree_cache_d )
static hashval_t streamer_tree_cache_get_hash ( )
inlinestatic
Return the tree hash value at slot IX in CACHE.   

References streamer_tree_cache_d::hashes.

Referenced by hash_tree(), and streamer_tree_cache_replace_tree().

static tree streamer_tree_cache_get_tree ( )
inlinestatic
Return the tree node at slot IX in CACHE.   

References streamer_tree_cache_d::nodes.

Referenced by lto_input_scc(), lto_read_body(), and streamer_get_pickled_tree().

bool streamer_tree_cache_insert ( struct streamer_tree_cache_d cache,
tree  t,
hashval_t  hash,
unsigned *  ix_p 
)
Insert tree node T in CACHE.  If T already existed in the cache
   return true.  Otherwise, return false.

   If IX_P is non-null, update it with the index into the cache where
   T has been stored.   

References streamer_tree_cache_insert_1().

Referenced by DFS_write_tree(), and lto_output_tree_1().

bool streamer_tree_cache_lookup ( struct streamer_tree_cache_d cache,
tree  t,
unsigned *  ix_p 
)
Return true if tree node T exists in CACHE, otherwise false.  If IX_P is
   not NULL, write to *IX_P the index into the cache where T is stored
   ((unsigned)-1 if T is not found).   

References pointer_map< T >::contains(), and streamer_tree_cache_d::node_map.

Referenced by DFS_write_tree(), hash_tree(), lto_output_decl_state_refs(), lto_output_tree(), write_global_references(), write_global_stream(), and write_symbol().

void streamer_tree_cache_replace_tree ( struct streamer_tree_cache_d cache,
tree  t,
unsigned  ix 
)
void streamer_write_builtin ( struct output_block ,
tree   
)
void streamer_write_chain ( struct output_block ,
tree  ,
bool   
)
void streamer_write_integer_cst ( struct output_block ,
tree  ,
bool   
)
void streamer_write_string_cst ( struct output_block ob,
struct lto_output_stream index_stream,
tree  string 
)
In tree-streamer-out.c.   
@verbatim Routines for emitting trees to a file stream.

Copyright (C) 2011-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi.nosp@m.llo@.nosp@m.googl.nosp@m.e.co.nosp@m.m

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

Output the STRING constant to the string
   table in OB.  Then put the index onto the INDEX_STREAM.   

References streamer_write_string_with_length().

Referenced by lto_output_toplevel_asms(), and streamer_write_tree_header().

void streamer_write_tree_body ( struct output_block ,
tree  ,
bool   
)
void streamer_write_tree_header ( struct output_block ,
tree   
)