GCC Middle and Back End API Reference
lto-section-out.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "cgraph.h"
#include "data-streamer.h"
#include "langhooks.h"
#include "lto-compress.h"
#include "print-tree.h"
Include dependency graph for lto-section-out.cc:


static void lto_append_data (const char *chars, unsigned int num_chars, void *opaque)
void lto_begin_section (const char *name, bool compress)
void lto_end_section (void)
void lto_write_data (const void *data, unsigned int size)
void lto_write_raw_data (const void *data, unsigned int size)
void lto_write_stream (struct lto_output_stream *obs)
struct lto_simple_output_blocklto_create_simple_output_block (enum lto_section_type section_type)
void lto_destroy_simple_output_block (struct lto_simple_output_block *ob)
struct lto_out_decl_statelto_new_out_decl_state (void)
void lto_delete_out_decl_state (struct lto_out_decl_state *state)
struct lto_out_decl_statelto_get_out_decl_state (void)
void lto_push_out_decl_state (struct lto_out_decl_state *state)
struct lto_out_decl_statelto_pop_out_decl_state (void)
void lto_record_function_out_decl_state (tree fn_decl, struct lto_out_decl_state *state)


static vec< lto_out_decl_state_ptrdecl_state_stack
vec< lto_out_decl_state_ptrlto_function_decl_states
static struct lto_compression_streamcompression_stream = NULL

Function Documentation

◆ lto_append_data()

static void lto_append_data ( const char * chars,
unsigned int num_chars,
void * opaque )
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, gcc_assert, ggc_alloc(), lang_hooks::lto, and NULL.

Referenced by lto_begin_section().

◆ lto_begin_section()

◆ lto_create_simple_output_block()

◆ lto_delete_out_decl_state()

void lto_delete_out_decl_state ( struct lto_out_decl_state * state)

◆ lto_destroy_simple_output_block()

◆ lto_end_section()

◆ lto_get_out_decl_state()

◆ lto_new_out_decl_state()

struct lto_out_decl_state * lto_new_out_decl_state ( void )

◆ lto_pop_out_decl_state()

struct lto_out_decl_state * lto_pop_out_decl_state ( void )
Pop the currently used out-decl state from top of stack.  

References decl_state_stack.

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

◆ lto_push_out_decl_state()

void lto_push_out_decl_state ( struct lto_out_decl_state * state)
Push STATE to top of out decl stack.  

References decl_state_stack.

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

◆ lto_record_function_out_decl_state()

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, i, lto_function_decl_states, LTO_N_DECL_STREAMS, and NULL.

Referenced by lto_output().

◆ lto_write_data()

◆ lto_write_raw_data()

void lto_write_raw_data ( const void * data,
unsigned int size )
Write SIZE bytes starting at DATA to the assembler.   

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

Referenced by copy_function_or_variable().

◆ lto_write_stream()

void lto_write_stream ( struct lto_output_stream * obs)

Variable Documentation

◆ compression_stream

struct lto_compression_stream* compression_stream = NULL
Pointer to the current compression stream.   

Referenced by lto_begin_section(), lto_end_section(), lto_write_data(), and lto_write_stream().

◆ decl_state_stack

vec<lto_out_decl_state_ptr> decl_state_stack
Functions for writing LTO sections.

   Copyright (C) 2009-2024 Free Software Foundation, Inc.
   Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>

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

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
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

Referenced by lto_get_out_decl_state(), lto_pop_out_decl_state(), and lto_push_out_decl_state().

◆ lto_function_decl_states

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 lto_record_function_out_decl_state(), and produce_asm_for_decls().