GCC Middle and Back End API Reference
toplev.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int toplev_main (int, char **)
void rest_of_decl_compilation (tree, int, int)
void rest_of_type_compilation (tree, int)
void init_optimization_passes (void)
bool enable_rtl_dump_file (void)
void init_eh (void)
void announce_function (tree)
void wrapup_global_declaration_1 (tree)
bool wrapup_global_declaration_2 (tree)
bool wrapup_global_declarations (tree *, int)
void check_global_declaration_1 (tree)
void check_global_declarations (tree *, int)
void emit_debug_global_declarations (tree *, int)
void write_global_declarations (void)
void dump_memory_report (bool)
void dump_profile_report (void)
void target_reinit (void)
void print_version (FILE *, const char *)
const char * get_src_pwd (void)
bool set_src_pwd (const char *)
HOST_WIDE_INT get_random_seed (bool)
const char * set_random_seed (const char *)

Variables

struct cl_decoded_optionsave_decoded_options
unsigned int save_decoded_options_count
unsigned local_tick
bool user_defined_section_attribute
int flag_rerun_cse_after_global_opts
struct ht * ident_hash

Function Documentation

void announce_function ( tree  )
void check_global_declaration_1 ( tree  )
void check_global_declarations ( tree ,
int   
)
void dump_memory_report ( bool  )
void dump_profile_report ( void  )

Output profile consistency.

References gcc::pass_manager::passes_by_id.

void emit_debug_global_declarations ( tree ,
int   
)
bool enable_rtl_dump_file ( void  )

Enable RTL dump for all the RTL passes.

HOST_WIDE_INT get_random_seed ( bool  )

Functions used to manipulate the random seed.

const char* get_src_pwd ( void  )

Functions used to get and set GCC's notion of in what directory compilation was started.

Return the directory from which the translation unit was initiated, in case set_src_pwd() was not called before to assign it a different value.

References global_dc.

void init_eh ( void  )

In except.c. Initialize exception handling. This is used by the Ada and LTO front ends to initialize EH "on demand". See lto-streamer-in.c and ada/gcc-interface/misc.c.

 Create the SjLj_Function_Context structure.  This should match
 the definition in unwind-sjlj.c.   
     builtin_setjmp takes a pointer to 5 words.   
     Cache the interesting field offsets so that we have
     easy access from rtl.   

References targetm.

void init_optimization_passes ( void  )
void print_version ( FILE *  ,
const char *   
)
void rest_of_decl_compilation ( tree  decl,
int  top_level,
int  at_end 
)

This is called from various places for FUNCTION_DECL, VAR_DECL, and TYPE_DECL nodes.

This does nothing for local (non-static) variables, unless the variable is a register variable with DECL_ASSEMBLER_NAME set. In that case, or if the variable is not an automatic, it sets up the RTL and outputs any assembler code (label definition, storage allocation and initialization).

DECL is the declaration. TOP_LEVEL is nonzero if this declaration is not within a function.

 We deferred calling assemble_alias so that we could collect
 other attributes such as visibility.  Emit the alias now.   
       A quirk of the initial implementation of aliases required that the
       user add "extern" to all of them.  Which is silly, but now
       historical.  Do note that the symbol is in fact locally defined.   
 Can't defer this, because it needs to happen before any
 later function definitions are processed.   
 Forward declarations for nested functions are not "external",
 but we need to treat them as if they were.   
     Don't output anything when a tentative file-scope definition
     is seen.  But at end of compilation, do output code for them.

     We do output all variables and rely on
     callgraph code to defer them except for forward declarations
     (see gcc.c-torture/compile/920624-1.c)  
         When reading LTO unit, we also read varpool, so do not
         rebuild it.   
          Like in rest_of_type_compilation, avoid confusing the debug
          information machinery when there are errors.   
 Let cgraph know about the existence of variables.   
void rest_of_type_compilation ( tree  ,
int   
)
const char* set_random_seed ( const char *  )
bool set_src_pwd ( const char *  )
void target_reinit ( void  )

Reinitialize everything when target parameters, such as register usage, have changed.

 Save *crtl and regno_reg_rtx around the reinitialization
 to allow target_reinit being called even after prepare_function_start.   
 Reinitialize RTL backend.   
 Reinitialize lang-dependent parts.   
 And restore it at the end, as free_after_compilation from
 expand_dummy_function_end clears it.   
int toplev_main ( int  ,
char **   
)
void wrapup_global_declaration_1 ( tree  )
bool wrapup_global_declaration_2 ( tree  )
bool wrapup_global_declarations ( tree ,
int   
)
void write_global_declarations ( void  )

lang_hooks.decls.final_write_globals: perform final processing on global variables.

 Really define vars that have had only a tentative definition.
 Really output inline functions that must actually be callable
 and have not been output so far.   
 Process the decls in reverse order–earliest first.
 Put them into VEC from back to front, then take out from front.   
 This lang hook is dual-purposed, and also finalizes the
 compilation unit.   
 Clean up.   

Variable Documentation

int flag_rerun_cse_after_global_opts

See toplev.c.

Set to non-zero if CSE should run after all GCSE optimizations are done.

struct ht* ident_hash

The hashtable, so that the C front ends can pass it to cpplib.

Referenced by get_identifier(), get_identifier_with_length(), gt_pch_save_stringpool(), mark_ident(), maybe_delete_ident(), maybe_get_identifier(), and stringpool_ggc_alloc().

unsigned local_tick

A unique local time stamp, might be zero if none is available.

Referenced by crash_signal().

struct cl_decoded_option* save_decoded_options

toplev.h - Various declarations for functions found in toplev.c Copyright (C) 1998-2013 Free Software Foundation, Inc.

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/. Decoded options, and number of such options.

Referenced by crash_signal(), and lto_write_options().

unsigned int save_decoded_options_count

Referenced by crash_signal(), and lto_write_options().

bool user_defined_section_attribute

True if the user has tagged the function with the 'section' attribute.

Referenced by crash_signal().