GCC Middle and Back End API Reference
lto-section-out.c File Reference

Functions

static void lto_append_data ()
void lto_begin_section ()
void lto_end_section ()
void lto_write_stream ()
void lto_append_block ()
void lto_output_data_stream (struct lto_output_stream *obs, const void *data, size_t len)
bool lto_output_decl_index (struct lto_output_stream *obs, struct lto_tree_ref_encoder *encoder, tree name, unsigned int *this_index)
void lto_output_field_decl_index (struct lto_out_decl_state *decl_state, struct lto_output_stream *obs, tree decl)
void lto_output_fn_decl_index (struct lto_out_decl_state *decl_state, struct lto_output_stream *obs, tree decl)
void lto_output_namespace_decl_index (struct lto_out_decl_state *decl_state, struct lto_output_stream *obs, tree decl)
void lto_output_var_decl_index (struct lto_out_decl_state *decl_state, struct lto_output_stream *obs, tree decl)
void lto_output_type_decl_index (struct lto_out_decl_state *decl_state, struct lto_output_stream *obs, tree decl)
void lto_output_type_ref_index (struct lto_out_decl_state *decl_state, struct lto_output_stream *obs, tree ref)
struct lto_simple_output_blocklto_create_simple_output_block ()
void lto_destroy_simple_output_block ()
struct lto_out_decl_statelto_new_out_decl_state ()
void lto_delete_out_decl_state ()
struct lto_out_decl_statelto_get_out_decl_state ()
void lto_push_out_decl_state ()
struct lto_out_decl_statelto_pop_out_decl_state ()
void lto_record_function_out_decl_state (tree fn_decl, struct lto_out_decl_state *state)

Variables

static vec
< lto_out_decl_state_ptr
decl_state_stack
vec< lto_out_decl_state_ptrlto_function_decl_states
static struct
lto_compression_stream
compression_stream = NULL

Function Documentation

static void lto_append_data ( )
static
Flush compressed stream data function, sends NUM_CHARS from CHARS
   to the append lang hook, OPAQUE is currently always NULL.   

References lang_hooks_for_lto::append_data, and lang_hooks::lto.

Referenced by lto_begin_section().

void lto_begin_section ( )
void lto_delete_out_decl_state ( )
struct lto_out_decl_state* lto_get_out_decl_state ( void  )
read
struct lto_out_decl_state* lto_new_out_decl_state ( void  )
read
bool lto_output_decl_index ( struct lto_output_stream obs,
struct lto_tree_ref_encoder encoder,
tree  name,
unsigned int *  this_index 
)
Lookup NAME in ENCODER.  If NAME is not found, create a new entry in
   ENCODER for NAME with the next available index of ENCODER,  then
   print the index to OBS.  True is returned if NAME was added to
   ENCODER.  The resulting index is stored in THIS_INDEX.

   If OBS is NULL, the only action is to add NAME to the encoder.  

References pointer_map< T >::insert(), streamer_write_uhwi_stream(), lto_tree_ref_encoder::tree_hash_table, and lto_tree_ref_encoder::trees.

Referenced by lto_output_field_decl_index(), lto_output_fn_decl_index(), lto_output_namespace_decl_index(), lto_output_type_decl_index(), lto_output_type_ref_index(), and lto_output_var_decl_index().

void lto_output_field_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a field DECL to OBS.   

References LTO_DECL_STREAM_FIELD_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_tree_ref().

void lto_output_fn_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a function DECL to OBS.   

References LTO_DECL_STREAM_FN_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_node(), and lto_output_tree_ref().

void lto_output_namespace_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a namespace DECL to OBS.   

References LTO_DECL_STREAM_NAMESPACE_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_tree_ref().

void lto_output_type_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a type DECL to OBS.   

References LTO_DECL_STREAM_TYPE_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_tree_ref().

void lto_output_type_ref_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  ref 
)
Output a type REF to OBS.   

References LTO_DECL_STREAM_TYPE, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by output_type_ref().

void lto_output_var_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
struct lto_out_decl_state* lto_pop_out_decl_state ( void  )
read
Pop the currently used out-decl state from top of stack.  

Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and lto_output().

void lto_push_out_decl_state ( )
Push STATE to top of out decl stack.  

Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and lto_output().

void lto_record_function_out_decl_state ( tree  fn_decl,
struct lto_out_decl_state state 
)
Record STATE after it has been used in serializing the body of
   FN_DECL.  STATE should no longer be used by the caller.  The ownership
   of it is taken over from this point.   

References lto_out_decl_state::fn_decl, LTO_N_DECL_STREAMS, lto_out_decl_state::streams, and lto_tree_ref_encoder::tree_hash_table.

Referenced by lto_output().


Variable Documentation

struct lto_compression_stream* compression_stream = NULL
static
Pointer to the current compression stream.   
vec<lto_out_decl_state_ptr> decl_state_stack
static
@verbatim Functions for writing LTO sections.

Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by Kenneth Zadeck zadec.nosp@m.k@na.nosp@m.tural.nosp@m.brid.nosp@m.ge.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/.

vec<lto_out_decl_state_ptr> lto_function_decl_states
List of out decl states used by functions.  We use this to
   generate the decl directory later.  

Referenced by produce_asm_for_decls().