GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "alloc-pool.h"
#include "timevar.h"
#include "memmodel.h"
#include "tm_p.h"
#include "optabs-libfuncs.h"
#include "insn-config.h"
#include "ira.h"
#include "recog.h"
#include "cgraph.h"
#include "coverage.h"
#include "diagnostic.h"
#include "varasm.h"
#include "tree-inline.h"
#include "realmpfr.h"
#include "version.h"
#include "flags.h"
#include "insn-attr.h"
#include "output.h"
#include "toplev.h"
#include "expr.h"
#include "intl.h"
#include "tree-diagnostic.h"
#include "reload.h"
#include "lra.h"
#include "dwarf2asm.h"
#include "debug.h"
#include "common/common-target.h"
#include "langhooks.h"
#include "cfgloop.h"
#include "hosthooks.h"
#include "opts.h"
#include "opts-diagnostic.h"
#include "stringpool.h"
#include "attribs.h"
#include "asan.h"
#include "tsan.h"
#include "plugin.h"
#include "context.h"
#include "pass_manager.h"
#include "auto-profile.h"
#include "dwarf2out.h"
#include "ipa-reference.h"
#include "symbol-summary.h"
#include "tree-vrp.h"
#include "sreal.h"
#include "ipa-cp.h"
#include "ipa-prop.h"
#include "ipa-utils.h"
#include "gcse.h"
#include "omp-offload.h"
#include "edit-context.h"
#include "tree-pass.h"
#include "dumpfile.h"
#include "ipa-fnsummary.h"
#include "dump-context.h"
#include "print-tree.h"
#include "optinfo-emit-json.h"
#include "ipa-modref-tree.h"
#include "ipa-modref.h"
#include "ipa-param-manipulation.h"
#include "dbgcnt.h"
#include "gcc-urlifier.h"
#include "unique-argv.h"
#include "selftest.h"
Macros | |
#define | INCLUDE_MEMORY |
#define | this_target_flag_state (&default_target_flag_state) |
#define | __VERSION__ "[?]" |
#define | GCC_GMP_STRINGIFY_VERSION3(X) |
#define | GCC_GMP_STRINGIFY_VERSION2(X) |
#define | GCC_GMP_VERSION_NUM(X, Y, Z) |
#define | GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL) |
#define | GCC_GMP_STRINGIFY_VERSION |
#define | INDIRECT_CALL_NAME "__indirect_call" |
Functions | |
static void | general_init (const char *, bool, unique_argv original_argv) |
static void | backend_init (void) |
static int | lang_dependent_init (const char *) |
static void | init_asm_output (const char *) |
static void | finalize () |
static void | crash_signal (int) ATTRIBUTE_NORETURN |
static void | compile_file (void) |
bool | set_src_pwd (const char *pwd) |
const char * | get_src_pwd (void) |
void | announce_function (tree decl) |
static void | init_local_tick (void) |
HOST_WIDE_INT | get_random_seed (bool noinit) |
void | set_random_seed (const char *val) |
void | wrapup_global_declaration_1 (tree decl) |
bool | wrapup_global_declaration_2 (tree decl) |
bool | wrapup_global_declarations (tree *vec, int len) |
void | print_version (FILE *file, const char *indent, bool show_global_state) |
static void * | realloc_for_line_map (void *ptr, size_t len) |
static void * | alloc_for_identifier_to_locale (size_t len) |
static void | output_stack_usage_1 (FILE *cf) |
static void | dump_final_node_vcg_start (FILE *f, tree decl) |
static void | dump_final_callee_vcg (FILE *f, location_t location, tree callee) |
static bool | dump_final_alias_vcg (cgraph_node *alias, void *f_) |
static void | dump_final_node_vcg (FILE *f) |
void | output_stack_usage (void) |
static FILE * | open_auxiliary_file (const char *ext) |
static void | internal_error_reentered (diagnostic_context *, const char *, va_list *) |
static void | internal_error_function (diagnostic_context *, const char *, va_list *) |
static bool | target_supports_section_anchors_p (void) |
static void | read_log_maxskip (auto_vec< unsigned > &values, align_flags_tuple *a) |
static void | parse_N_M (const char *flag, align_flags &a) |
void | parse_alignment_opts (void) |
static void | process_options () |
static void | backend_init_target (void) |
static void | lang_dependent_init_target (void) |
void | initialize_rtl (void) |
void | target_reinit (void) |
void | dump_memory_report (const char *header) |
static bool | standard_type_bitsize (int bitsize) |
static void | do_compile () |
Variables | |
struct cl_decoded_option * | save_decoded_options |
unsigned int | save_decoded_options_count |
vec< cl_decoded_option > * | save_opt_decoded_options |
const struct gcc_debug_hooks * | debug_hooks |
tree | current_function_decl |
const char * | current_function_func_begin_label |
static const char * | flag_random_seed |
unsigned | local_tick |
HOST_WIDE_INT | random_seed |
rtx | stack_limit_rtx |
class target_flag_state | default_target_flag_state |
const char * | user_label_prefix |
FILE * | asm_out_file |
FILE * | aux_info_file |
FILE * | callgraph_info_file = NULL |
static bitmap | callgraph_info_external_printed |
FILE * | stack_usage_file = NULL |
static bool | no_backend = false |
static const char * | src_pwd |
static int | rtl_initialized |
#define __VERSION__ "[?]" |
Referenced by print_version().
#define GCC_GMP_STRINGIFY_VERSION |
Referenced by print_version().
#define GCC_GMP_STRINGIFY_VERSION2 | ( | X | ) |
#define GCC_GMP_STRINGIFY_VERSION3 | ( | X | ) |
#define GCC_GMP_VERSION GCC_GMP_VERSION_NUM(__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL) |
#define GCC_GMP_VERSION_NUM | ( | X, | |
Y, | |||
Z ) |
#define INCLUDE_MEMORY |
Top level of GCC compilers (cc1, cc1plus, etc.) Copyright (C) 1987-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/>.
This is the top level of cc1/c++. It parses command args, opens files, invokes the various passes in the proper order, and counts the time used by each. Error messages and low-level interface to malloc also handled here.
#define INDIRECT_CALL_NAME "__indirect_call" |
Dump placeholder node for indirect calls in VCG format.
Referenced by dump_final_callee_vcg(), and dump_final_node_vcg_start().
#define this_target_flag_state (&default_target_flag_state) |
|
static |
A helper function: used as the allocator function for identifier_to_locale.
References ggc_alloc_atomic().
Referenced by general_init().
void announce_function | ( | tree | decl | ) |
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().
|
static |
Initialize the compiler back end. This function is called only once, when starting the compiler.
References init_emit_once(), init_emit_regs(), init_inline_once(), init_regs(), init_rtlanal(), init_varasm_once(), and save_register_info().
Referenced by do_compile().
|
static |
This function can be called multiple times to reinitialize the compiler back end when register classes or instruction sets have changed, before each function.
References caller_save_initialized_p, expand_dummy_function_end(), init_alias_target(), init_dummy_function_start(), init_expmed(), init_expr_target(), init_fake_stack_mems(), init_lower_subreg(), init_reload(), init_set_costs(), ira_init(), ira_use_lra_p, and recog_init().
Referenced by initialize_rtl().
|
static |
Compile an entire translation unit. Write a file of assembly output and various debugging dumps.
References asan_finish_file(), asm_out_file, debug_hooks, debuginfo_start(), debuginfo_stop(), lang_hooks::decls, dump_location_info(), dw2_output_indirect_constants(), dwarf2out_frame_finish(), end_auto_profile(), symbol_table::finalize_compilation_unit(), gcc_debug_hooks::finish, dump_context::finish_any_json_writer(), finish_tm_clone_pairs(), free_attr_data(), gate_hwasan(), dump_context::get(), ggc_protect_identifiers, HOST_WIDE_INT_1U, hwasan_finish_file(), INCREMENTAL_LINK_LTO, insn_locations_init(), invoke_plugin_callbacks(), maximum_field_alignment, NULL, NULL_TREE, omp_finish_file(), output_object_blocks(), output_shared_constant_pool(), lang_hooks::parse_file, lang_hooks_for_decls::post_compilation_parsing_cleanups, process_pending_assemble_externals(), SANITIZE_ADDRESS, SANITIZE_THREAD, seen_error(), symtab, targetm, timevar_pop(), timevar_push(), timevar_start(), timevar_stop(), tsan_finish_file(), and weak_finish().
Referenced by do_compile().
|
static |
Handler for fatal signals, such as SIGSEGV. These are transformed into ICE messages, which is much more user friendly. In case the error printer crashes, reset the signal to prevent infinite recursion.
References FATAL_EXIT_CODE, internal_error(), output_operand_lossage(), strsignal(), and this_is_asm_operands.
Referenced by general_init().
|
static |
Initialize the compiler, and compile the input file.
References backend_init(), compile_file(), coverage_init(), debuginfo_init(), real_format::emax, real_format::emin, finalize(), FOR_EACH_MODE_IN_CLASS, dump_context::get(), ggc_protect_identifiers, i, init_adjust_machine_modes(), init_derived_machine_modes(), init_final(), symbol_table::initialize(), int_n_data, int_n_enabled_p, invoke_plugin_callbacks(), lang_dependent_init(), int_n_data_t::m, no_backend, NULL, real_format::p, REAL_MODE_FORMAT, SCALAR_FLOAT_MODE_P, seen_error(), dump_context::set_json_writer(), sorry(), standard_type_bitsize(), statistics_init(), symtab, targetm, timevar_start(), and timevar_stop().
Referenced by toplev::main().
|
static |
Callback for cgraph_node::call_for_symbol_thunks_and_aliases to dump to F_ a node and an edge from ALIAS->DECL to CURRENT_FUNCTION_DECL.
References current_function_decl, symtab_node::decl, DECL_SOURCE_LOCATION, dump_final_node_vcg_start(), expand_location(), LOCATION_LOCUS, print_decl_identifier(), PRINT_DECL_UNIQUE_NAME, and UNKNOWN_LOCATION.
Referenced by dump_final_node_vcg().
|
static |
Dump final cgraph edge in VCG format.
References bitmap_set_bit, callgraph_info_external_printed, current_function_decl, DECL_EXTERNAL, DECL_UID, dump_final_node_vcg_start(), expand_location(), INDIRECT_CALL_NAME, LOCATION_LOCUS, print_decl_identifier(), PRINT_DECL_UNIQUE_NAME, and UNKNOWN_LOCATION.
Referenced by dump_final_node_vcg().
|
static |
Dump final cgraph node in VCG format.
References cgraph_node::call_for_symbol_thunks_and_aliases(), CALLGRAPH_INFO_DYNAMIC_ALLOC, CALLGRAPH_INFO_STACK_USAGE, cfun, current_function_decl, callinfo_callee::decl, dump_final_alias_vcg(), dump_final_callee_vcg(), dump_final_node_vcg_start(), expand_location(), FOR_EACH_VEC_SAFE_ELT, cgraph_node::get(), i, callinfo_callee::location, callinfo_dalloc::location, callinfo_dalloc::name, NULL, output_stack_usage_1(), vec_free(), and vec_safe_length().
Referenced by output_stack_usage().
|
static |
References INDIRECT_CALL_NAME, print_decl_identifier(), PRINT_DECL_NAME, PRINT_DECL_ORIGIN, and PRINT_DECL_UNIQUE_NAME.
Referenced by dump_final_alias_vcg(), dump_final_callee_vcg(), and dump_final_node_vcg().
void dump_memory_report | ( | const char * | header | ) |
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().
|
static |
Clean up: close opened files, etc.
References asm_out_file, aux_info_file, BITMAP_FREE, bitmap_obstack_release(), callgraph_info_external_printed, callgraph_info_file, coverage_remove_note_file(), dbg_cnt_list_all_counters(), debuginfo_fini(), dump_memory_report(), dump_profile_report(), fatal_error(), lang_hooks::finish, gcc::pass_manager::finish_optimization_passes(), g, gcc::context::get_passes(), input_location, lra_finish_once(), no_backend, NULL, seen_error(), stack_usage_file, and statistics_fini().
Referenced by do_compile(), ggc_alloc(), ggc_cleared_alloc(), ggc_cleared_vec_alloc(), ggc_vec_alloc(), and rest_of_decl_compilation().
|
static |
Initialization of the front end environment, before command line options are parsed. Signal handlers, internationalization etc. ARGV0 is main's argv[0].
References alloc_for_identifier_to_locale(), BUILTINS_LOCATION, crash_signal(), debuginfo_early_init(), diagnostic_initialize(), diagnostic_source_printing_options::enabled, host_hooks::extra_signals, g, gcc_init_libintl, gcc::context::get_dumps(), ggc_alloc(), ggc_free(), ggc_round_alloc_size(), global_dc, global_options, identifier_to_locale_alloc, identifier_to_locale_free, init_ggc(), init_reg_sets(), init_stringpool(), init_ttree(), input_location, internal_error_function(), line_table, diagnostic_context::m_internal_error, diagnostic_context::m_show_column, diagnostic_context::m_source_printing, make_gcc_urlifier(), diagnostic_source_printing_options::min_margin_width, lang_hooks::option_lang_mask, progname, realloc_for_line_map(), gcc::dump_manager::register_dumps(), diagnostic_context::set_option_manager(), diagnostic_context::set_original_argv(), gcc::context::set_passes(), diagnostic_context::set_path_format(), diagnostic_context::set_show_cwe(), diagnostic_context::set_show_highlight_colors(), diagnostic_context::set_show_option_requested(), diagnostic_context::set_show_path_depths(), diagnostic_context::set_show_rules(), diagnostic_context::set_urlifier(), diagnostic_source_printing_options::show_event_links_p, diagnostic_source_printing_options::show_labels_p, diagnostic_source_printing_options::show_line_numbers_p, statistics_early_init(), symtab, tree_diagnostics_defaults(), and UNKNOWN_LOCATION.
Referenced by toplev::main().
HOST_WIDE_INT get_random_seed | ( | bool | noinit | ) |
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().
const char * get_src_pwd | ( | void | ) |
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().
|
static |
Open assembly code output file. Do this even if -fsyntax-only is on, because then the driver will have provided the name of a temporary file or bit bucket for us. NAME is the file specified on the command line, possibly NULL.
References ASM_COMMENT_START, asm_out_file, fatal_error(), fopen, fputc(), free(), gen_command_line_string(), gen_producer_string(), diagnostic_context::get_lang_mask(), global_dc, HOST_BIT_BUCKET, inform(), lang_hooks::name, NULL, print_version, save_decoded_options, save_decoded_options_count, strip_off_ending(), targetm, and UNKNOWN_LOCATION.
Referenced by lang_dependent_init().
|
static |
Initialize local_tick with the time of day, or -1 if flag_random_seed is set.
References flag_random_seed, local_tick, and NULL.
Referenced by toplev::main().
void initialize_rtl | ( | void | ) |
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().
|
static |
Auxiliary callback for the diagnostics code.
References emergency_dump_function(), global_dc, internal_error_reentered(), diagnostic_context::m_internal_error, and warn_if_plugins().
Referenced by general_init().
|
static |
Alternative diagnostics callback for reentered ICE reporting.
References dump_file.
Referenced by internal_error_function().
|
static |
Language-dependent initialization. Returns nonzero on success.
References BITMAP_ALLOC, bitmap_obstack_initialize(), BUILTINS_LOCATION, callgraph_info_external_printed, callgraph_info_file, debug_hooks, gcc_debug_hooks::init, lang_hooks::init, init_asm_output(), init_eh(), input_location, lang_dependent_init_target(), NULL, open_auxiliary_file(), stack_usage_file, timevar_pop(), and timevar_push().
Referenced by do_compile().
|
static |
Initialize things that are both lang-dependent and target-dependent. This function can be called more than once if target parameters change.
References gcc_assert, init_optabs(), and this_target_rtl.
Referenced by lang_dependent_init(), and target_reinit().
|
static |
Open an auxiliary output file.
References fatal_error(), fopen, free(), input_location, and NULL.
Referenced by lang_dependent_init().
void output_stack_usage | ( | void | ) |
Output stack usage and callgraph info, as requested.
References callgraph_info_file, dump_final_node_vcg(), NULL, and output_stack_usage_1().
Referenced by rest_of_handle_thread_prologue_and_epilogue().
|
static |
Output stack usage information.
References CALLGRAPH_INFO_STACK_USAGE, current_function_allocates_dynamic_stack_space, current_function_decl, current_function_dynamic_stack_size, current_function_has_unbounded_dynamic_stack_size, current_function_pushed_stack_size, current_function_static_stack_size, DECL_SOURCE_LOCATION, HOST_WIDE_INT_MAX, HOST_WIDE_INT_PRINT_DEC, print_decl_identifier(), PRINT_DECL_NAME, PRINT_DECL_ORIGIN, PRINT_DECL_REMAP_DEBUG, stack_usage_file, STATIC, warning(), and warning_at().
Referenced by dump_final_node_vcg(), and output_stack_usage().
void parse_alignment_opts | ( | void | ) |
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().
|
static |
Parse "N[:M[:N2[:M2]]]" string FLAG into a pair of struct align_flags.
References a, cache, NULL, parse_and_check_align_values(), r, read_log_maxskip(), and UNKNOWN_LOCATION.
Referenced by parse_alignment_opts().
void print_version | ( | FILE * | file, |
const char * | indent, | ||
bool | show_global_state ) |
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().
|
static |
Process the options that have been parsed.
References abi_version_at_least, asan_shadow_offset_set_p(), aux_info_file, btf_debuginfo_p(), build_optimization_node(), CF_BRANCH, CF_FULL, CF_NONE, CF_RETURN, CF_SET, codeview_debuginfo_p(), diagnostic_context::create_edit_context(), ctf_debuginfo_p(), CTFINFO_LEVEL_NONE, debug_hooks, debug_set_count(), debug_set_to_format(), debug_type_names, diagnose_options(), diagnostic_classify_diagnostic(), diagnostic_inhibit_notes(), DINFO_LEVEL_NONE, DINFO_LEVEL_NORMAL, dump_go_spec_init(), DWARF2_DEBUG, dwarf2_debug_hooks, dwarf2_lineno_debug_hooks, dwarf2out_default_as_loc_support(), dwarf2out_default_as_locview_support(), dwarf_debuginfo_p(), error_at(), fatal_error(), flag_stack_protector_set_by_fhardened_p, fopen, fputc(), FRAME_GROWS_DOWNWARD, free(), gcc_assert, gen_command_line_string(), global_dc, global_options, global_options_set, hash_table_sanitize_eq_limit, inform(), input_location, IRA_REGION_MIXED, IRA_REGION_ONE, lang_GNU_C(), line_table, maximum_field_alignment, lang_hooks::name, no_backend, NO_DEBUG, NO_STACK_CHECK, NULL, optimization_current_node, optimization_default_node, OPTION_SET_P, option_unspecified_p(), parse_and_check_patch_area(), SANITIZE_ADDRESS, SANITIZE_HWADDRESS, SANITIZE_KERNEL_ADDRESS, SANITIZE_SHADOW_CALL_STACK, SANITIZE_USER_ADDRESS, save_decoded_options, save_decoded_options_count, sorry(), STACK_GROWS_DOWNWARD, startswith(), target_supports_section_anchors_p(), targetm, UNKNOWN_LOCATION, USER_LABEL_PREFIX, user_label_prefix, VMS_AND_DWARF2_DEBUG, VMS_DEBUG, vmsdbg_debug_hooks, and warning_at().
Referenced by toplev::main().
|
static |
Parse "N[:M][:...]" into struct align_flags A. VALUES contains parsed values (in reverse order), all processed values are popped.
References a, and floor_log2().
Referenced by parse_N_M().
|
static |
A helper function; used as the reallocator function for cpp's line table.
References ggc_realloc().
Referenced by general_init().
void set_random_seed | ( | const char * | val | ) |
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().
bool set_src_pwd | ( | const char * | pwd | ) |
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.
|
static |
References CHAR_TYPE_SIZE, INT_TYPE_SIZE, LONG_LONG_TYPE_SIZE, LONG_TYPE_SIZE, and SHORT_TYPE_SIZE.
Referenced by do_compile().
void target_reinit | ( | void | ) |
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.
|
static |
Return true if the current target supports -fsection-anchors.
Referenced by process_options().
void wrapup_global_declaration_1 | ( | tree | decl | ) |
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().
FILE* asm_out_file |
Output files for assembler code (real compiler output) and debugging dumps.
Referenced by app_disable(), app_enable(), asan_function_start(), asm_fprintf(), asm_show_source(), assemble_align(), assemble_asm(), assemble_constant_contents(), assemble_end_function(), assemble_external(), assemble_integer_with_op(), assemble_start_function(), assemble_static_space(), assemble_string(), assemble_trampoline_template(), assemble_undefined_decl(), assemble_variable(), assemble_variable_contents(), assemble_zeros(), compile_file(), default_asm_output_ident_directive(), default_assemble_visibility(), default_coff_asm_named_section(), default_elf_asm_named_section(), default_external_libcall(), default_file_start(), default_pe_asm_named_section(), do_assemble_alias(), do_assemble_symver(), dump_basic_block_info(), dw2_asm_output_addr(), dw2_asm_output_addr_rtx(), dw2_asm_output_data(), dw2_asm_output_data_raw(), dw2_asm_output_data_sleb128(), dw2_asm_output_data_sleb128_raw(), dw2_asm_output_data_uleb128(), dw2_asm_output_data_uleb128_raw(), dw2_asm_output_delta(), dw2_asm_output_delta_uleb128(), dw2_asm_output_encoded_addr_rtx(), dw2_asm_output_nstring(), dw2_asm_output_offset(), dw2_asm_output_offset(), dw2_asm_output_symname_uleb128(), dw2_assemble_integer(), dwarf2out_begin_prologue(), dwarf2out_do_cfi_startproc(), dwarf2out_emit_cfi(), dwarf2out_end_epilogue(), dwarf2out_switch_text_section(), dwarf2out_vms_begin_epilogue(), dwarf2out_vms_end_prologue(), elf_record_gcc_switches(), emit_common(), emit_local(), emit_tls_common(), expand_thunk(), final_end_function(), final_scan_insn_1(), finalize(), find_empty_loc_ranges_at_text_label(), generic_type_p(), globalize_decl(), init_asm_output(), make_decl_rtl(), output_addr_table(), output_address(), output_asm_insn(), output_asm_label(), output_asm_name(), output_asm_operand_names(), output_btf_header(), output_call_frame_info(), output_cfa_loc_raw(), output_cfi_directive(), output_comp_unit(), output_constant(), output_constant_def_contents(), output_constant_pool(), output_constant_pool_1(), output_constant_pool_contents(), output_constructor(), output_ctf_header(), output_die(), output_fde(), output_function_exception_table(), output_line_info(), output_loc_list(), output_loc_operands(), output_loc_operands_raw(), output_loc_sequence_raw(), output_one_function_exception_table(), output_operand(), output_ranges(), output_rnglists(), output_section_asm_op(), output_skeleton_debug_sections(), rest_of_decl_compilation(), rest_of_handle_final(), switch_to_eh_frame_section(), weak_finish(), and weak_finish_1().
FILE* aux_info_file |
Referenced by finalize(), and process_options().
|
static |
Referenced by dump_final_callee_vcg(), finalize(), and lang_dependent_init().
FILE* callgraph_info_file = NULL |
Referenced by finalize(), lang_dependent_init(), and output_stack_usage().
tree current_function_decl |
The FUNCTION_DECL for the function currently being compiled, or 0 if between functions.
Referenced by add_call_edges_for_seq(), adjust_assumption_stmt_r(), adjust_context_and_scope(), adjust_return_value_with_ops(), autofdo::afdo_annotate_cfg(), autofdo::afdo_indirect_call(), autofdo::afdo_vpt_for_early_inline(), asan_emit_stack_protection(), assemble_start_function(), assign_parm_find_data_types(), assign_parm_find_entry_rtl(), assign_parm_setup_reg(), assign_parms(), assign_parms_augmented_arg_list(), assign_parms_initialize_all(), assign_stack_local_1(), autofdo::auto_profile(), branch_prob(), build_duplicate_type(), build_instrumentation_call(), can_implement_as_sibling_call_p(), cfg_layout_merge_blocks(), cgraph_build_static_cdtor_1(), cgraph_debug_gimple_stmt(), check_bb_profile(), check_call(), check_counter(), check_omp_nesting_restrictions(), clobber_return_register(), collect_fn_hard_reg_usage(), computable_teams_clause(), computation_cost(), compute_discriminator(), compute_fn_summary_for_current(), compute_frame_pointer_to_fb_displacement(), compute_function_frequency(), consider_split(), const_ok_for_output_1(), convert_cfa_to_fb_loc_list(), convert_local_reference_op(), convert_nonlocal_reference_op(), convert_to_integer_1(), copy_fn(), copy_gimple_seq_and_replace_locals(), coverage_begin_function(), coverage_compute_lineno_checksum(), coverage_counter_alloc(), coverage_end_function(), create_access_replacement(), create_artificial_label(), create_asan_shadow_var(), create_assumption_fn(), create_coalesce_list_for_region(), function_reader::create_function(), create_omp_child_function(), create_omp_child_function_name(), create_stack_guard(), create_tailcall_accumulator(), current_function_section(), decide_function_section(), decl_address_invariant_p(), default_print_patchable_function_entry(), detect_type_change(), detect_type_change_ssa(), determine_unlikely_bbs(), df_get_entry_block_def_set(), diagnose_omp_structured_block_errors(), diagnose_tm_blocks(), do_per_function(), do_per_function_toporder(), do_reload(), dump_alias_info(), dump_bb_info(), dump_dfa_stats(), dump_final_alias_vcg(), dump_final_callee_vcg(), dump_final_node_vcg(), dump_function_to_file(), dump_loc(), dump_loc(), dump_one_pass(), gcc::pass_manager::dump_passes(), dump_ranger(), dump_scope_blocks(), dump_tree_ssa(), dw_loc_list(), dwarf2out_alloc_current_fde(), dwarf2out_begin_prologue(), dwarf2out_do_cfi_startproc(), autofdo::early_inline(), early_inliner(), eliminate_regs_1(), eliminate_dom_walker::eliminate_stmt(), eliminate_tail_call(), tree_switch_conversion::switch_decision_tree::emit(), estimate_bb_frequencies(), execute_all_ipa_transforms(), execute_build_cfg(), execute_fixup_cfg(), execute_ipa_pass_list(), execute_lower_coro_builtins(), execute_lower_omp(), execute_lower_tm(), execute_oacc_device_lower(), execute_oacc_loop_designation(), execute_omp_oacc_neuter_broadcast(), execute_one_pass(), execute_ranger_vrp(), execute_split_functions(), execute_todo(), expand_block_edges(), expand_builtin(), expand_builtin_goacc_parlevel_id_size(), expand_builtin_setjmp_receiver(), expand_builtin_strub_leave(), expand_builtin_strub_update(), expand_call(), expand_debug_source_expr(), expand_expr_real_1(), expand_function_end(), expand_function_start(), expand_gimple_stmt_1(), expand_goto(), expand_oacc_for(), expand_omp(), expand_omp_target(), expand_omp_taskreg(), expand_one_var(), expand_regions_1(), expand_return(), expand_thunk(), expand_used_vars(), expand_value_return(), final_end_function(), final_scan_insn_1(), final_start_function_1(), symbol_table::finalize_compilation_unit(), find_empty_loc_ranges_at_text_label(), find_obviously_necessary_stmts(), find_return_bb(), find_tail_calls(), find_var_candidates(), finite_loop_p(), fixup_reorder_chain(), fold_builtin_FUNCTION(), fold_builtin_next_arg(), fold_internal_goacc_dim(), cfn_goacc_dim::fold_range(), for_all_parms(), function_called_by_processed_nodes_p(), function_mergeable_rodata_prefix(), gate_tm_init(), gen_call_used_regs_seq(), generate_setjmp_warnings(), get_coverage_counts(), compiler_data_hooks::get_current_logical_location(), autofdo::get_inline_stack(), current_fndecl_logical_location::get_internal_name(), current_fndecl_logical_location::get_kind(), get_loop_location(), get_modref_function_summary(), current_fndecl_logical_location::get_name_for_path_output(), current_fndecl_logical_location::get_name_with_scope(), autofdo::get_relative_location_for_stmt(), current_fndecl_logical_location::get_short_name(), get_spill_slot_decl(), get_stack_dynamic_offset(), gimple_add_tmp_var(), gimple_dump_bb_buff(), gimple_dump_cfg(), gimple_gen_ic_func_profiler(), gimple_verify_flow_info(), gimplify_bind_expr(), gimplify_body(), gimplify_cond_expr(), gimplify_expr(), gimplify_function_tree(), gimplify_label_expr(), gimplify_modify_expr(), gimplify_oacc_declare(), gimplify_omp_loop(), gimplify_return_expr(), gimplify_var_or_parm_decl(), in_initial_view_p(), infer_nonnull_range_by_attribute(), init_lowered_empty_function(), initialize_inlined_parameters(), initialize_parameter_reductions(), inline_transform(), instantiate_virtual_regs(), instrument_derefs(), instrument_object_size(), ipa_analyze_call_uses(), ipa_passes(), ipa_polymorphic_call_context::ipa_polymorphic_call_context(), ipa_read_optimization_summaries_1(), ipa_read_summaries_1(), ipa_record_return_value_range(), ipa_reference_get_read_global(), ipa_reference_get_written_global(), ipa_tm_insert_gettmclone_call(), ipa_tm_scan_irr_block(), ipa_tm_scan_irr_function(), ipa_tm_transform_calls_redirect(), ipa_write_optimization_summaries_1(), ipa_write_summaries_2(), ipcp_get_parm_bits(), ipcp_transform_function(), is_redundant_typedef(), lhd_print_error_function(), loc_list_from_tree_1(), lower_assumption(), lower_function_body(), lower_gimple_bind(), lower_lastprivate_conditional_clauses(), lower_omp_critical(), lra_eliminate_regs_1(), mark_all_vars_used_1(), mark_nonssa_use(), maybe_add_sra_candidate(), maybe_build_inner_data_region(), maybe_inline_call_in_expr(), maybe_remove_omp_member_access_dummy_vars(), ipa_param_adjustments::modify_call(), needs_to_live_in_memory(), new_omp_context(), noncall_stmt_may_be_vtbl_ptr_store(), note_no_context_vars(), note_simd_array_uses_cb(), oacc_do_neutering(), oacc_loop_discovery(), omp_apply_tile(), omp_construct_selector_matches(), omp_context_selector_matches(), omp_copy_decl(), omp_copy_decl_2(), omp_default_clause(), omp_maybe_offloaded(), omp_maybe_offloaded_ctx(), omp_member_access_dummy_var(), omp_notice_variable(), omp_oacc_kernels_decompose(), optimize_atomic_compare_exchange_p(), optimize_inline_calls(), optimize_va_list_gpr_fpr_size(), optrecord_json_writer::optinfo_to_json(), output_function(), output_function_exception_table(), output_stack_usage_1(), pass_init_dump_file(), points_to_local_or_readonly_memory_p(), points_to_possible_sra_candidate_p(), pop_cfun(), pop_function_context(), possible_polymorphic_call_target_p(), possible_polymorphic_call_targets(), predict_loops(), process_assignment(), profile_function(), promote_decl_mode(), push_cfun(), push_struct_function(), read_thunk_profile(), cgraph_edge::rebuild_edges(), cgraph_edge::rebuild_references(), record_vars(), refs_local_or_readonly_memory_p(), remove_unused_locals(), reorder_blocks(), ipa_param_body_adjustments::reset_debug_stmts(), rest_of_clean_state(), rest_of_decl_compilation(), rest_of_handle_final(), cgraph_node::rtl_info(), rtl_merge_blocks(), rtx_addr_can_trap_p_1(), rtx_for_function_call(), scan_omp_for(), scan_omp_simd(), secname_for_decl(), self_recursive_call_p(), set_nothrow_function_flags(), setjmp_args_warning(), setup_incoming_promotions(), sjlj_emit_function_enter(), split_function(), stack_protect_decl_phase(), suitable_for_tail_call_opt_p(), switch_to_exception_section(), tail_merge_optimize(), test_nonssa_use(), tree_bb_level_predictions(), tree_optimize_tail_calls_1(), ubsan_create_edge(), ubsan_encode_value(), unlikely_executed_stmt_p(), unlikely_text_section(), unlikely_text_section_p(), update_call_edge_frequencies(), use_register_for_decl(), verify_gimple_label(), vt_add_function_parameter(), vt_add_function_parameters(), vt_init_cfa_base(), and vt_initialize().
const char* current_function_func_begin_label |
Set to the FUNC_BEGIN label of the current function, or NULL if none.
Referenced by dw2_output_call_site_table(), and dwarf2out_begin_prologue().
const struct gcc_debug_hooks* debug_hooks |
Debug hooks - dependent upon command line options.
Referenced by analyze_functions(), varpool_node::assemble_decl(), assemble_start_function(), symbol_table::compile(), compile_file(), expand_call_inline(), final_end_function(), final_scan_insn_1(), final_start_function_1(), symbol_table::finalize_compilation_unit(), cgraph_node::finalize_function(), finalize_size_functions(), lang_dependent_init(), lhd_finalize_early_debug(), lto_input_tree(), lto_write_tree_1(), toplev::main(), mark_scope_block_unused(), maybe_output_next_view(), process_options(), symbol_table::remove_unreachable_nodes(), rest_of_decl_compilation(), rest_of_handle_final(), rest_of_type_compilation(), run_rtl_passes(), and tree_function_versioning().
class target_flag_state default_target_flag_state |
|
static |
A random sequence of characters, unless overridden by user.
Referenced by init_local_tick(), and set_random_seed().
unsigned local_tick |
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().
Referenced by do_compile(), finalize(), toplev::finalize(), toplev::main(), process_options(), and target_reinit().
HOST_WIDE_INT random_seed |
Random number for this compilation
Referenced by compare_debug_dump_opt_spec_function(), get_random_seed(), and set_random_seed().
|
static |
Perform initializations that are lang-dependent or target-dependent. but matters only for late optimizations and RTL generation.
Referenced by toplev::finalize(), and initialize_rtl().
struct cl_decoded_option* save_decoded_options |
Decoded options, and number of such options.
Referenced by toplev::finalize(), init_asm_output(), lto_write_options(), toplev::main(), and process_options().
unsigned int save_decoded_options_count |
Referenced by toplev::finalize(), init_asm_output(), lto_write_options(), toplev::main(), and process_options().
vec<cl_decoded_option>* save_opt_decoded_options |
Vector of saved Optimization decoded command line options.
Referenced by toplev::main().
|
static |
The current working directory of a translation. It's generally the directory from which compilation was initiated, but a preprocessed file may specify the original directory in which it was created.
Referenced by get_src_pwd(), lto_location_cache::input_location_and_block(), and set_src_pwd().
rtx stack_limit_rtx |
-f flags.
When non-NULL, indicates that whenever space is allocated on the stack, the resulting stack pointer must not pass this address---that is, for stacks that grow downward, the stack pointer must always be greater than or equal to this address; for stacks that grow upward, the stack pointer must be less than this address. At present, the rtx may be either a REG or a SYMBOL_REF, although the support provided depends on the backend.
Referenced by allocate_dynamic_stack_space(), expand_function_start(), handle_common_deferred_options(), and init_emit_regs().
FILE* stack_usage_file = NULL |
Referenced by finalize(), lang_dependent_init(), and output_stack_usage_1().
const char* user_label_prefix |
The user symbol prefix after having resolved same.
Referenced by asm_fprintf(), symbol_table::assembler_names_equal_p(), symbol_table::decl_assembler_name_hash(), default_mangle_assembler_name(), and process_options().