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.  
     Read the word representing the memory address for the tree
     as it was written by the writer.  This is useful when
     debugging differences between the writer and reader.  
     We should never see an SSA_NAME tree.  Only the version numbers of
     SSA names are ever written out.  See input_ssa_names.  
     Instantiate a new tree using the header data.  
         For all other nodes, materialize the tree with a raw
         make_node call.  
     Store the original address of the tree as seen by the writer
     in RESULT's aux field.  This is useful when debugging streaming
     problems.  This way, a debugging session can be started on
     both writer and reader with a breakpoint using this address
     value in both.  

Referenced by lto_read_tree_1().

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.  
     These are the TS_* structures that are either handled or
     explicitly ignored by the streamer routines.  
     Anything not marked above will trigger the following assertion.
     If this assertion triggers, it means that there is a new TS_*
     structure that should be handled by the streamer.  
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.  

Referenced by hash_scc(), and lto_write_tree().

void streamer_pack_tree_bitfields ( struct output_block ob,
struct bitpack_d bp,
tree  expr 
)
   Pack all the bitfields in EXPR into a bit pack.  
     Note that all these functions are highly sensitive to changes in
     the types and sizes of each of the fields being packed.  
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.  
     Read the bitpack of non-pointer values from IB.  
     The first word in BP contains the code of the tree that we
     are about to read.  
     Unpack all the value fields from BP.  

References HOST_WIDEST_INT, lto_tag_to_tree_code(), streamer_read_hwi(), and streamer_read_string_cst().

void streamer_read_tree_body ( struct lto_input_block ib,
struct data_in data_in,
tree  expr 
)
   Read all pointer fields in EXPR from input block IB.  DATA_IN
   contains tables and descriptors for the file being read.  
void streamer_tree_cache_append ( struct streamer_tree_cache_d cache,
tree  t,
hashval_t  hash 
)
   Appends tree node T to CACHE, even if T already existed in it.  

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

Referenced by lto_read_tree_1().

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.  

Referenced by streamer_tree_cache_insert().

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

Referenced by lto_read_tree_1().

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_d::hashes, streamer_tree_cache_d::node_map, streamer_tree_cache_add_to_node_array(), streamer_tree_cache_get_hash(), and streamer_tree_cache_insert_1().

Referenced by lto_write_tree().

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).  

Referenced by lto_output().

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().

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