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

Functions

void streamer_check_handled_ts_structures ()
static void streamer_tree_cache_add_to_node_array (struct streamer_tree_cache_d *cache, unsigned ix, tree t, hashval_t hash)
static bool streamer_tree_cache_insert_1 (struct streamer_tree_cache_d *cache, tree t, hashval_t hash, unsigned *ix_p, bool insert_at_next_slot_p)
bool streamer_tree_cache_insert (struct streamer_tree_cache_d *cache, tree t, hashval_t hash, unsigned *ix_p)
void streamer_tree_cache_replace_tree (struct streamer_tree_cache_d *cache, tree t, unsigned ix)
void streamer_tree_cache_append (struct streamer_tree_cache_d *cache, tree t, hashval_t hash)
bool streamer_tree_cache_lookup (struct streamer_tree_cache_d *cache, tree t, unsigned *ix_p)
static void record_common_node ()
static void preload_common_nodes ()
struct streamer_tree_cache_dstreamer_tree_cache_create ()
void streamer_tree_cache_delete ()

Function Documentation

static void preload_common_nodes ( )
static
Preload common nodes into CACHE and make sure they are merged
   properly according to the gimple type table.   

References global_trees, integer_types, itk_char, itk_none, record_common_node(), sizetype_tab, stk_type_kind_last, TI_BOOLEAN_FALSE, TI_BOOLEAN_TRUE, TI_BOOLEAN_TYPE, and TI_MAX.

Referenced by streamer_tree_cache_create().

static void record_common_node ( )
static
Record NODE in CACHE.   

References streamer_tree_cache_d::nodes, and streamer_tree_cache_append().

Referenced by preload_common_nodes().

void streamer_check_handled_ts_structures ( void  )
@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().

static void streamer_tree_cache_add_to_node_array ( struct streamer_tree_cache_d cache,
unsigned  ix,
tree  t,
hashval_t  hash 
)
static
Helper for streamer_tree_cache_insert_1.  Add T to CACHE->NODES at
   slot IX.   

References streamer_tree_cache_d::hashes, and streamer_tree_cache_d::nodes.

Referenced by streamer_tree_cache_append(), streamer_tree_cache_insert_1(), and streamer_tree_cache_replace_tree().

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 ( )
read
void streamer_tree_cache_delete ( )
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().

static bool streamer_tree_cache_insert_1 ( struct streamer_tree_cache_d cache,
tree  t,
hashval_t  hash,
unsigned *  ix_p,
bool  insert_at_next_slot_p 
)
static
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
   in *IX_P.

   If T already existed in CACHE, return true.  Otherwise,
   return false.   

References pointer_map< T >::insert(), streamer_tree_cache_d::node_map, streamer_tree_cache_d::nodes, and streamer_tree_cache_add_to_node_array().

Referenced by streamer_tree_cache_append(), streamer_tree_cache_insert(), and streamer_tree_cache_replace_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).   

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 
)