GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
class | toplev |
Functions | |
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 | global_decl_processing (void) |
void | dump_memory_report (const char *) |
void | dump_profile_report (void) |
void | target_reinit (void) |
void | print_version (FILE *, const char *, bool) |
const char * | get_src_pwd (void) |
bool | set_src_pwd (const char *) |
HOST_WIDE_INT | get_random_seed (bool) |
void | set_random_seed (const char *) |
void | parse_alignment_opts (void) |
void | initialize_rtl (void) |
Variables | |
struct cl_decoded_option * | save_decoded_options |
unsigned int | save_decoded_options_count |
vec< cl_decoded_option > * | save_opt_decoded_options |
unsigned | local_tick |
int | flag_rerun_cse_after_global_opts |
struct ht * | ident_hash |
struct ht * | ident_hash_extra |
|
extern |
Called when the start of a function definition is parsed, this function prints on stderr the name of the function.
References DECL_NAME, lang_hooks::decl_printable_name, diagnostic_set_last_function, global_dc, IDENTIFIER_POINTER, identifier_to_locale(), diagnostic_context::m_printer, NULL, and pp_needs_newline().
Referenced by cgraph_node::expand().
|
extern |
References dump_alias_stats(), dump_alloc_pool_statistics(), dump_bitmap_statistics(), dump_ggc_loc_statistics(), dump_gimple_statistics(), dump_hash_table_loc_statistics(), dump_line_table_statistics(), dump_pta_stats(), dump_rtx_statistics(), dump_tree_statistics(), dump_vec_loc_statistics(), fputc(), ggc_print_statistics(), i, and stringpool_statistics().
Referenced by symbol_table::compile(), and finalize().
|
extern |
Output profile consistency.
References gcc::pass_manager::dump_profile_report(), g, and gcc::context::get_passes().
Referenced by finalize().
|
extern |
Enable RTL dump for all the RTL passes.
References DK_rtl, gcc::dump_manager::dump_enable_all(), g, gcc::context::get_dumps(), NULL, TDF_BLOCKS, and TDF_DETAILS.
Referenced by handle_common_deferred_options().
|
extern |
Functions used to manipulate the random seed.
Obtain the random_seed. Unless NOINIT, initialize it if it's not provided in the command line.
References local_tick, O_RDONLY, and random_seed.
Referenced by get_file_function_name(), and lto_get_section_name().
|
extern |
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 src_pwd.
Referenced by comp_dir_string(), ctf_add_cuname(), lto_location_cache::input_location_and_block(), and lto_output_location_1().
|
extern |
Generic global declaration processing. This is meant to be called by the front-ends at the end of parsing. C/C++ do their own thing, but other front-ends may call this.
References DECL_CHAIN, lang_hooks::decls, free(), lang_hooks_for_decls::getdecls, i, list_length(), timevar_start(), timevar_stop(), and wrapup_global_declarations().
|
extern |
In except.cc. Initialize exception handling. This is used by the Ada and LTO front ends to initialize EH "on demand". See lto-streamer-in.cc and ada/gcc-interface/misc.cc.
References BITS_PER_WORD, build_array_type(), build_decl(), build_function_type_list(), build_index_type(), build_pointer_type(), BUILTINS_LOCATION, hash_map< KeyId, Value, Traits >::create_ggc(), DECL_ASSEMBLER_NAME, DECL_EXTERNAL, DECL_FIELD_BIT_OFFSET, DECL_FIELD_CONTEXT, DECL_FIELD_OFFSET, DECL_USER_ALIGN, get_identifier(), global_options, integer_type_node, layout_type(), lang_hooks_for_types::make_type, NULL, POINTER_SIZE, ptr_type_node, SET_DECL_ALIGN, setjmp_fn, size_int, sjlj_fc_call_site_ofs, sjlj_fc_data_ofs, sjlj_fc_jbuf_ofs, sjlj_fc_lsda_ofs, sjlj_fc_personality_ofs, sjlj_fc_type_node, targetm, TREE_CHAIN, TREE_PUBLIC, tree_to_uhwi(), TREE_TYPE, TYPE_FIELDS, lang_hooks_for_types::type_for_mode, type_to_runtime_map, lang_hooks::types, and UI_SJLJ.
Referenced by lang_dependent_init(), and lto_init_eh().
|
extern |
|
extern |
References backend_init_target(), g_timer, ira_init_once(), rtl_initialized, and this_target_rtl.
Referenced by init_function_start(), read_rtl_function_body(), and read_rtl_function_body_from_file_range().
|
extern |
Process -falign-foo=N[:M[:N2[:M2]]] options.
References align_functions, align_jumps, align_labels, align_loops, and parse_N_M().
Referenced by invoke_set_current_function_hook().
|
extern |
Print version information to FILE. Each line begins with INDENT (for the case where FILE is the assembler output file). If SHOW_GLOBAL_STATE is true (for cc1 etc), we are within the compiler proper and can print pertinent state (e.g. params and plugins). If SHOW_GLOBAL_STATE is false (for use by libgccjit), we are outside the compiler, and we don't hold the mutex on the compiler's global state: we can't print params and plugins, since they might not be initialized, or might be being manipulated by a compile running in another thread.
References _, __VERSION__, GCC_GMP_STRINGIFY_VERSION, N_, lang_hooks::name, and print_plugins_versions().
|
extern |
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.
References asm_out_file, assemble_alias(), BUILTINS_LOCATION, current_function_decl, debug_hooks, DECL_ASSEMBLER_NAME_SET_P, DECL_ATTRIBUTES, DECL_DEFER_OUTPUT, DECL_EXTERNAL, decl_function_context(), DECL_HAS_VALUE_EXPR_P, DECL_INITIAL, DECL_REGISTER, DECL_SAVED_TREE, DECL_SOURCE_LOCATION, DECL_STRUCT_FUNCTION, decl_type_context(), gcc_debug_hooks::early_global_decl, finalize(), varpool_node::finalize_decl(), varpool_node::get_create(), get_identifier(), HAS_DECL_ASSEMBLER_NAME_P, last_assemble_variable_decl, lookup_attribute(), make_decl_rtl(), NULL, seen_error(), targetm, timevar_pop(), timevar_push(), TREE_CODE, TREE_STATIC, TREE_STRING_POINTER, TREE_VALUE, gcc_debug_hooks::type_decl, and VAR_P.
Referenced by expand_one_hard_reg_var(), and wrapup_global_declaration_2().
|
extern |
Called after finishing a record, union or enumeral type.
References debug_hooks, seen_error(), timevar_pop(), timevar_push(), gcc_debug_hooks::type_decl, and TYPE_STUB_DECL.
|
extern |
Set flag_random_seed to VAL, and if non-null, reinitialize random_seed.
References crc32_string(), flag_random_seed, and random_seed.
Referenced by handle_common_deferred_options().
|
extern |
Initialize src_pwd with the given string, and return true. If it was already initialized, return false. As a special case, it may be called with a NULL argument to test whether src_pwd has NOT been initialized yet.
References src_pwd.
|
extern |
Reinitialize everything when target parameters, such as register usage, have changed.
References crtl, global_options, global_options_set, init_emit_regs(), init_regs(), lang_dependent_init_target(), no_backend, NULL, optimization_current_node, optimization_default_node, regno_reg_rtx, this_fn_optabs, this_target_rtl, and TREE_OPTIMIZATION.
|
extern |
A subroutine of wrapup_global_declarations. We've come to the end of the compilation unit. All deferred variables should be undeferred, and all incomplete decls should be finalized.
References DECL_DEFER_OUTPUT, DECL_SIZE, lang_hooks::finish_incomplete_decl, HAS_DECL_ASSEMBLER_NAME_P, and VAR_P.
Referenced by wrapup_global_declarations().
A subroutine of wrapup_global_declarations. Decide whether or not DECL needs to be output. Return true if it is output.
References symtab_node::alias, symtab_node::analyzed, DECL_ARTIFICIAL, DECL_ASSEMBLER_NAME, DECL_COMDAT, DECL_EXTERNAL, DECL_HAS_VALUE_EXPR_P, symtab_node::definition, varpool_node::get(), symbol_table::global_info_ready, rest_of_decl_compilation(), symtab, TREE_ASM_WRITTEN, TREE_PUBLIC, TREE_READONLY, TREE_STATIC, TREE_USED, and VAR_P.
Referenced by wrapup_global_declarations().
Do any final processing required for the declarations in VEC, of which there are LEN. We write out inline functions and variables that have been deferred until this point, but which are required. Returns nonzero if anything was put out.
References i, wrapup_global_declaration_1(), and wrapup_global_declaration_2().
Referenced by global_decl_processing().
|
extern |
See toplev.cc.
Set to non-zero if CSE should run after all GCSE optimizations are done.
Referenced by execute_rtl_cprop(), execute_rtl_hoist(), execute_rtl_pre(), execute_rtl_store_motion(), and rest_of_clean_state().
|
extern |
The hashtables, so that the C front ends can pass them to cpplib.
String pool for GCC. Copyright (C) 2000-2024 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/>.
String text, identifier text and identifier node allocator. Identifiers are uniquely stored in a hash table. We use cpplib's hash table implementation. libiberty's hashtab.c is not used because it requires 100% average space overhead per string, which is unacceptable. Also, this algorithm is faster.
Referenced by get_identifier(), get_identifier_with_length(), ggc_mark_stringpool(), ggc_purge_stringpool(), gt_pch_save_stringpool(), init_stringpool(), maybe_get_identifier(), and stringpool_statistics().
|
extern |
Referenced by ggc_mark_stringpool(), ggc_purge_stringpool(), gt_pch_save_stringpool(), and init_stringpool().
|
extern |
A unique local time stamp, might be zero if none is available.
A local time stamp derived from the time of compilation. It will be zero if the system cannot provide a time. It will be -1u, if the user has specified a particular random seed.
Referenced by coverage_finish(), coverage_init(), get_random_seed(), and init_local_tick().
|
extern |
toplev.h - Various declarations for functions found in toplev.cc Copyright (C) 1998-2024 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.
Decoded options, and number of such options.
Referenced by toplev::finalize(), init_asm_output(), lto_write_options(), toplev::main(), and process_options().
|
extern |
Referenced by toplev::finalize(), init_asm_output(), lto_write_options(), toplev::main(), and process_options().
|
extern |
Vector of saved Optimization decoded command line options.
Referenced by toplev::main().