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 "cfghooks.h"
#include "df.h"
#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
#include "emit-rtl.h"
#include "recog.h"
#include "cgraph.h"
#include "tree-pretty-print.h"
#include "varasm.h"
#include "insn-attr.h"
#include "conditions.h"
#include "flags.h"
#include "output.h"
#include "except.h"
#include "rtl-error.h"
#include "toplev.h"
#include "reload.h"
#include "intl.h"
#include "cfgrtl.h"
#include "debug.h"
#include "tree-pass.h"
#include "tree-ssa.h"
#include "cfgloop.h"
#include "stringpool.h"
#include "attribs.h"
#include "asan.h"
#include "rtl-iter.h"
#include "print-rtl.h"
#include "function-abi.h"
#include "common/common-target.h"
#include "diagnostic.h"
#include "dwarf2out.h"
Macros | |
#define | INCLUDE_ALGORITHM /* reverse @endverbatim */ |
#define | CC_STATUS_INIT |
#define | IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) |
#define | JUMP_TABLES_IN_TEXT_SECTION 0 |
#define | SEEN_NOTE 1 |
#define | SEEN_EMITTED 2 |
#define | SEEN_NEXT_VIEW 4 |
#define | LABEL_ALIGN(LABEL) |
#define | LOOP_ALIGN(LABEL) |
#define | LABEL_ALIGN_AFTER_BARRIER(LABEL) |
#define | JUMP_ALIGN(LABEL) |
#define | ADDR_VEC_ALIGN(ADDR_VEC) |
#define | INSN_LENGTH_ALIGNMENT(INSN) |
#define | INSN_SHUID(INSN) |
#define | LABEL_TO_ALIGNMENT(LABEL) |
#define | NO_PROFILE_COUNTERS 0 |
Functions | |
static int | compute_discriminator (location_t loc) |
static int | asm_insn_count (rtx) |
static void | profile_function (FILE *) |
static void | profile_after_prologue (FILE *) |
static bool | notice_source_line (rtx_insn *, bool *) |
static rtx | walk_alter_subreg (rtx *, bool *) |
static void | output_asm_name (void) |
static void | output_alternate_entry_point (FILE *, rtx_insn *) |
static tree | get_mem_expr_from_op (rtx, int *) |
static void | output_asm_operand_names (rtx *, int *, int) |
static int | align_fuzz (rtx, rtx, int, unsigned) |
static void | collect_fn_hard_reg_usage (void) |
void | init_final (const char *filename) |
void | default_function_pro_epilogue (FILE *) |
void | default_function_switched_text_sections (FILE *file, tree decl, bool new_is_cold) |
void | no_asm_to_stream (FILE *file) |
void | app_enable (void) |
void | app_disable (void) |
int | dbr_sequence_length (void) |
void | init_insn_lengths (void) |
static int | get_attr_length_1 (rtx_insn *insn, int(*fallback_fn)(rtx_insn *)) |
int | get_attr_length (rtx_insn *insn) |
int | get_attr_min_length (rtx_insn *insn) |
static int | final_addr_vec_align (rtx_jump_table_data *addr_vec) |
align_flags | label_to_alignment (rtx label) |
static int | align_fuzz (rtx start, rtx end, int known_align_log, unsigned int growth) |
int | insn_current_reference_address (rtx_insn *branch) |
void | compute_alignments (void) |
static void | grow_label_align (void) |
void | update_alignments (vec< rtx > &label_pairs) |
rtl_opt_pass * | make_pass_compute_alignments (gcc::context *ctxt) |
void | shorten_branches (rtx_insn *first) |
int | asm_str_count (const char *templ) |
static bool | dwarf2_debug_info_emitted_p (tree decl) |
static tree | choose_inner_scope (tree s1, tree s2) |
static void | change_scope (rtx_insn *orig_insn, tree s1, tree s2) |
static void | reemit_insn_block_notes (void) |
const char * | get_some_local_dynamic_name () |
static void | set_next_view_needed (int *seen) |
static void | clear_next_view_needed (int *seen) |
static void | maybe_output_next_view (int *seen) |
static bool | in_initial_view_p (rtx_insn *insn) |
static void | final_start_function_1 (rtx_insn **firstp, FILE *file, int *seen, int optimize_p) |
void | final_start_function (rtx_insn *first, FILE *file, int optimize_p) |
void | final_end_function (void) |
static void | dump_basic_block_info (FILE *file, rtx_insn *insn, basic_block *start_to_bb, basic_block *end_to_bb, int bb_map_size, int *bb_seqn) |
static void | final_1 (rtx_insn *first, FILE *file, int seen, int optimize_p) |
void | final (rtx_insn *first, FILE *file, int optimize_p) |
const char * | get_insn_template (int code, rtx_insn *insn) |
static rtx | call_from_call_insn (rtx_call_insn *insn) |
static void | asm_show_source (const char *filename, int linenum) |
bool | jumptable_relocatable (void) |
static rtx_insn * | final_scan_insn_1 (rtx_insn *insn, FILE *file, int optimize_p, int nopeepholes, int *seen) |
rtx_insn * | final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p, int nopeepholes, int *seen) |
static int | map_decl_to_instance (const_tree decl) |
int | insn_discriminator (const rtx_insn *insn) |
void | cleanup_subreg_operands (rtx_insn *insn) |
rtx | alter_subreg (rtx *xp, bool final_p) |
void | output_operand_lossage (const char *cmsgid,...) |
void | output_asm_insn (const char *templ, rtx *operands) |
void | output_asm_label (rtx x) |
void | mark_symbol_refs_as_used (rtx x) |
void | output_operand (rtx x, int code) |
void | output_address (machine_mode mode, rtx x) |
void | output_addr_const (FILE *file, rtx x) |
void | output_quoted_string (FILE *asm_file, const char *string) |
void | fprint_whex (FILE *f, unsigned HOST_WIDE_INT value) |
static int | sprint_ul_rev (char *s, unsigned long value) |
void | fprint_ul (FILE *f, unsigned long value) |
int | sprint_ul (char *s, unsigned long value) |
void | asm_fprintf (FILE *file, const char *p,...) |
bool | leaf_function_p (void) |
bool | final_forward_branch_p (rtx_insn *insn) |
static unsigned int | rest_of_handle_final (void) |
rtl_opt_pass * | make_pass_final (gcc::context *ctxt) |
static unsigned int | rest_of_handle_shorten_branches (void) |
rtl_opt_pass * | make_pass_shorten_branches (gcc::context *ctxt) |
static unsigned int | rest_of_clean_state (void) |
rtl_opt_pass * | make_pass_clean_state (gcc::context *ctxt) |
static bool | self_recursive_call_p (rtx_insn *insn) |
#define ADDR_VEC_ALIGN | ( | ADDR_VEC | ) |
Referenced by final_scan_insn_1(), and shorten_branches().
#define CC_STATUS_INIT |
Most ports don't need to define CC_STATUS_INIT. So define a null default for it to save conditionalization later.
Referenced by final_1(), and final_scan_insn_1().
#define INCLUDE_ALGORITHM /* reverse @endverbatim */ |
Convert RTL to assembler code and output it, for GNU compiler. 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 final pass of the compiler. It looks at the rtl code for a function and outputs assembler code. Call `final_start_function' to output the assembler code for function entry, `final' to output assembler code for some RTL code, `final_end_function' to output assembler code for function exit. If a function is compiled in several pieces, each piece is output separately with `final'. Some optimizations are also done at this level. Move instructions that were made unnecessary by good register allocation are detected and omitted from the output. (Though most of these are removed by the last jump pass.) Instructions to set the condition codes are omitted when it can be seen that the condition codes already had the desired values. In some cases it is sufficient if the inherited condition codes have related values, but this may require the following insn (the one that tests the condition codes) to be modified. The code for the function prologue and epilogue are generated directly in assembler by the target functions function_prologue and function_epilogue. Those instructions never exist as rtl.
#define INSN_LENGTH_ALIGNMENT | ( | INSN | ) |
Referenced by shorten_branches().
#define INSN_SHUID | ( | INSN | ) |
Referenced by align_fuzz(), final_forward_branch_p(), insn_current_reference_address(), and shorten_branches().
#define IS_ASM_LOGICAL_LINE_SEPARATOR | ( | C, | |
STR ) |
Is the given character a logical line separator for the assembler?
Referenced by asm_str_count().
#define JUMP_ALIGN | ( | LABEL | ) |
Referenced by compute_alignments().
#define JUMP_TABLES_IN_TEXT_SECTION 0 |
Referenced by final_scan_insn_1(), and shorten_branches().
#define LABEL_ALIGN | ( | LABEL | ) |
Code to handle alignment inside shorten_branches.
Here is an explanation how the algorithm in align_fuzz can give proper results: Call a sequence of instructions beginning with alignment point X and continuing until the next alignment point `block X'. When `X' is used in an expression, it means the alignment value of the alignment point. Call the distance between the start of the first insn of block X, and the end of the last insn of block X `IX', for the `inner size of X'. This is clearly the sum of the instruction lengths. Likewise with the next alignment-delimited block following X, which we shall call block Y. Call the distance between the start of the first insn of block X, and the start of the first insn of block Y `OX', for the `outer size of X'. The estimated padding is then OX - IX. OX can be safely estimated as if (X >= Y) OX = round_up(IX, Y) else OX = round_up(IX, X) + Y - X Clearly est(IX) >= real(IX), because that only depends on the instruction lengths, and those being overestimated is a given. Clearly round_up(foo, Z) >= round_up(bar, Z) if foo >= bar, so we needn't worry about that when thinking about OX. When X >= Y, the alignment provided by Y adds no uncertainty factor for branch ranges starting before X, so we can just round what we have. But when X < Y, we don't know anything about the, so to speak, `middle bits', so we have to assume the worst when aligning up from an address mod X to one mod Y, which is Y - X.
Referenced by compute_alignments(), and shorten_branches().
#define LABEL_ALIGN_AFTER_BARRIER | ( | LABEL | ) |
Referenced by shorten_branches().
#define LABEL_TO_ALIGNMENT | ( | LABEL | ) |
Referenced by align_fuzz(), compute_alignments(), final_scan_insn_1(), label_to_alignment(), shorten_branches(), and update_alignments().
#define LOOP_ALIGN | ( | LABEL | ) |
Referenced by compute_alignments().
#define NO_PROFILE_COUNTERS 0 |
Referenced by profile_function().
#define SEEN_EMITTED 2 |
Referenced by final_scan_insn_1().
#define SEEN_NEXT_VIEW 4 |
Referenced by maybe_output_next_view(), and set_next_view_needed().
#define SEEN_NOTE 1 |
Bitflags used by final_scan_insn.
Referenced by final_scan_insn_1().
The differences in addresses between a branch and its target might grow or shrink depending on the alignment the start insn of the range (the branch for a forward branch or the label for a backward branch) starts out on; if these differences are used naively, they can even oscillate infinitely. We therefore want to compute a 'worst case' address difference that is independent of the alignment the start insn of the range end up on, and that is at least as large as the actual difference. The function align_fuzz calculates the amount we have to add to the naively computed difference, by traversing the part of the alignment chain of the start insn of the range that is in front of the end insn of the range, and considering for each alignment the maximum amount that it might contribute to a size increase. For casesi tables, we also want to know worst case minimum amounts of address difference, in case a machine description wants to introduce some common offset that is added to all offsets in a table. For this purpose, align_fuzz with a growth argument of 0 computes the appropriate adjustment.
Compute the maximum delta by which the difference of the addresses of START and END might grow / shrink due to a different address for start which changes the size of alignment insns between START and END. KNOWN_ALIGN_LOG is the alignment known for START. GROWTH should be ~0 if the objective is to compute potential code size increase, and 0 if the objective is to compute potential shrink. The return value is undefined for any other value of GROWTH.
References end(), INSN_ADDRESSES, insn_lengths, INSN_SHUID, INSN_UID(), LABEL_TO_ALIGNMENT, align_flags::levels, align_flags_tuple::log, uid_align, and uid_shuid.
Referenced by insn_current_reference_address(), and shorten_branches().
If X is a SUBREG, try to replace it with a REG or a MEM, based on the thing it is a subreg of. Do it anyway if FINAL_P.
References adjust_address, adjust_address_nv, byte_lowpart_offset(), gen_rtx_REG_offset(), GET_MODE, HARD_REGISTER_P, MEM_P, offset, paradoxical_subreg_p(), REG_P, simplify_subreg(), SUBREG_BYTE, subreg_lowpart_p(), SUBREG_REG, subreg_regno(), and y.
Referenced by alter_subregs(), cleanup_subreg_operands(), lra_eliminate_regs_1(), output_operand(), remove_pseudos(), simplify_operand_subreg(), and walk_alter_subreg().
void app_disable | ( | void | ) |
Disable APP processing of subsequent output. Called from varasm.cc before most kinds of output.
References app_on, and asm_out_file.
Referenced by assemble_start_function(), assemble_variable(), final_end_function(), final_scan_insn_1(), and output_call_frame_info().
void app_enable | ( | void | ) |
Enable APP processing of subsequent output. Used before the output from an `asm' statement.
References app_on, and asm_out_file.
Referenced by assemble_asm(), final_scan_insn_1(), and output_call_frame_info().
void asm_fprintf | ( | FILE * | file, |
const char * | p, | ||
... ) |
A poor man's fprintf, with the added features of %I, %R, %L, and %U. %R prints the value of REGISTER_PREFIX. %L prints the value of LOCAL_LABEL_PREFIX. %U prints the value of USER_LABEL_PREFIX. %I prints the value of IMMEDIATE_PREFIX. %O runs ASM_OUTPUT_OPCODE to transform what follows in the string. Also supported are %d, %i, %u, %x, %X, %o, %c, %s and %%. We handle alternate assembler dialects here, just like output_asm_insn.
References asm_out_file, gcc_unreachable, HOST_WIDE_INT_PRINT, and user_label_prefix.
|
static |
Given the body of an INSN known to be generated by an ASM statement, return the number of machine instructions likely to be generated for this insn. This is used to compute its length.
References asm_str_count(), decode_asm_operands(), GET_CODE, NULL, and XSTR.
Referenced by get_attr_length_1(), and shorten_branches().
|
static |
Print a comment into the asm showing FILENAME, LINENUM, and the corresponding source line, if available.
References ASM_COMMENT_START, asm_out_file, fputc(), char_span::get_buffer(), diagnostic_context::get_file_cache(), file_cache::get_source_line(), global_dc, and char_span::length().
Referenced by final_scan_insn_1().
int asm_str_count | ( | const char * | templ | ) |
Return the number of machine instructions likely to be generated for the inline-asm template.
References count, and IS_ASM_LOGICAL_LINE_SEPARATOR.
Referenced by asm_insn_count(), and estimate_num_insns().
|
static |
Given a CALL_INSN, find and return the nested CALL.
References CALL_P, COND_EXEC_CODE, gcc_assert, gcc_unreachable, GET_CODE, PATTERN(), SET, XEXP, and XVECEXP.
Referenced by final_scan_insn_1().
Emit lexical block notes needed to change scope from S1 to S2.
References BLOCK_NUMBER, BLOCK_SUPERCONTEXT, emit_note_before(), gcc_assert, NOTE_BLOCK, and NULL_TREE.
Referenced by reemit_insn_block_notes().
Return scope resulting from combination of S1 and S2.
References BLOCK_NUMBER.
Referenced by reemit_insn_block_notes().
void cleanup_subreg_operands | ( | rtx_insn * | insn | ) |
For each operand in INSN, simplify (subreg (reg)) so that it refers directly to the desired hard register.
References alter_subreg(), changed, df_insn_rescan(), recog_data_d::dup_loc, extract_insn_cached(), GET_CODE, i, MEM_P, recog_data_d::n_dups, recog_data_d::n_operands, recog_data_d::operand, recog_data_d::operand_loc, recog_data, and walk_alter_subreg().
Referenced by final_scan_insn_1(), reload(), and split_insn().
|
inlinestatic |
Clear the flag in *SEEN indicating we need to emit the next view. This should be called next to the source_line debug hook.
Referenced by final_scan_insn_1(), and maybe_output_next_view().
|
static |
Collect hard register usage for the current function.
References CALL_P, crtl, current_function_decl, find_all_hard_reg_sets(), fixed_reg_set, function_abi::full_and_partial_reg_clobbers(), cgraph_rtl_info::function_used_regs, gcc_assert, get_insns(), hard_reg_set_subset_p(), i, insn_callee_abi(), next_insn(), NONDEBUG_INSN_P, NULL, NULL_RTX, cgraph_node::rtl_info(), self_recursive_call_p(), SET_HARD_REG_BIT, and targetm.
Referenced by rest_of_handle_final().
void compute_alignments | ( | void | ) |
Compute branch alignments based on CFG profile.
References AVOID_CFG_MODIFICATIONS, BB_HEAD, bb_loop_depth(), CDI_DOMINATORS, cfun, basic_block_def::count, count, profile_count::dump(), dump_file, dump_flow_info(), dump_reg_info(), ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, flow_loops_dump(), FOR_EACH_BB_FN, FOR_EACH_EDGE, free_dominance_info(), get_first_label_num(), loop::header, basic_block_def::index, profile_count::initialized_p(), loop::inner, JUMP_ALIGN, LABEL_ALIGN, label_align, LABEL_P, LABEL_TO_ALIGNMENT, LOOP_ALIGN, basic_block_def::loop_father, loop_optimizer_finalize(), loop_optimizer_init(), align_flags::max(), max_label_num(), max_labelno, min_labelno, NULL, loop::num, optimize_bb_for_size_p(), optimize_bb_for_speed_p(), optimize_function_for_size_p(), basic_block_def::preds, basic_block_def::prev_bb, single_succ(), single_succ_p(), TDF_DETAILS, and profile_count::zero().
|
inlinestatic |
Compute discriminator to be written to assembly for current instruction. Note: actual usage depends on loc_discriminator_kind setting.
Set DISCRIMINATOR to the appropriate value, possibly derived from LOC.
References BLOCK_SUPERCONTEXT, block_ultimate_origin(), current_function_decl, DECL_P, decl_to_instance_map, get_discriminator_from_loc(), inlined_function_outer_scope_p(), LOCATION_BLOCK, map_decl_to_instance(), and TREE_CODE.
Referenced by insn_discriminator(), and notice_source_line().
int dbr_sequence_length | ( | void | ) |
Return the number of slots filled in the current delayed branch sequence (we don't count the insn needing the delay slot). Zero if not in a delayed branch sequence.
References final_sequence, and XVECLEN.
void default_function_pro_epilogue | ( | FILE * | ) |
Default target function prologue and epilogue assembler output. If not overridden for epilogue code, then the function body itself contains return instructions wherever needed.
Referenced by final_start_function_1().
Default target function switched text sections.
|
static |
Dumper helper for basic block information. FILE is the assembly output file, and INSN is the instruction being emitted.
References ASM_COMMENT_START, asm_out_file, basic_block_def::count, profile_count::dump(), dump_edge_info(), FOR_EACH_EDGE, basic_block_def::index, profile_count::initialized_p(), INSN_UID(), NULL, basic_block_def::preds, basic_block_def::succs, and TDF_DETAILS.
Referenced by final_1().
Return true if DWARF2 debug info can be emitted for DECL.
References DECL_IGNORED_P, dwarf_based_debuginfo_p(), and dwarf_debuginfo_p().
Referenced by final_end_function(), final_scan_insn_1(), and final_start_function_1().
void final | ( | rtx_insn * | first, |
FILE * | file, | ||
int | optimize_p ) |
This is an exported final_1, callable without SEEN.
References final_1(), in_initial_view_p(), and NEXT_INSN().
|
static |
Output assembler code for some insns: all or part of a function. For description of args, see `final_start_function', above.
References BB_END, BB_HEAD, CC_STATUS_INIT, cfun, delete_insn(), dump_basic_block_info(), final_scan_insn(), FOR_EACH_BB_REVERSE_FN, free(), gcc_assert, get_max_uid(), init_recog(), INSN_ADDRESSES, INSN_ADDRESSES_SIZE, insn_current_address, insn_last_address, INSN_UID(), last_ignored_compare, maybe_output_next_view(), NEXT_INSN(), NOTE_KIND, NOTE_P, and NULL.
Referenced by final(), and rest_of_handle_final().
|
static |
References exact_log2(), rtx_jump_table_data::get_data_mode(), and GET_MODE_SIZE().
void final_end_function | ( | void | ) |
Output assembler code for the end of a function. For clarity, args are same as those of `final_start_function' even though not all of them are needed.
References app_disable(), asm_out_file, current_function_decl, debug_hooks, DECL_IGNORED_P, dwarf2_debug_info_emitted_p(), dwarf2out_do_frame(), dwarf2out_end_epilogue(), gcc_debug_hooks::end_epilogue, gcc_debug_hooks::end_function, high_function_linenum, last_filename, last_linenum, some_local_dynamic_name, and targetm.
Referenced by rest_of_handle_final().
Return true if branch is a forward branch. Uses insn_shuid array, so it works only in the final pass. May be used by output templates to customary add branch prediction hints.
References gcc_assert, INSN_SHUID, JUMP_LABEL, and uid_shuid.
rtx_insn * final_scan_insn | ( | rtx_insn * | insn, |
FILE * | file, | ||
int | optimize_p, | ||
int | nopeepholes, | ||
int * | seen ) |
This is a wrapper around final_scan_insn_1 that allows ports to call it recursively without a known value for SEEN. The value is saved at the outermost call, and recovered for recursive calls. Recursive calls MUST pass NULL, or the same pointer if they can otherwise get to it.
References final_scan_insn_1(), gcc_assert, and NULL.
Referenced by final_1(), final_scan_insn_1(), and final_start_function_1().
|
static |
The final scan for one insn, INSN. Args are same as in `final', except that INSN is the insn being scanned. Value returned is the next insn to be scanned. NOPEEPHOLES is the flag to disallow peephole processing (currently used for within delayed branch sequence output). SEEN is used to track the end of the prologue, for emitting debug information. We force the emission of a line note after both NOTE_INSN_PROLOGUE_END and NOTE_INSN_FUNCTION_BEG.
References ADDR_VEC_ALIGN, app_disable(), app_enable(), as_a(), ASM_COMMENT_START, ASM_INPUT_SOURCE_LOCATION, asm_noperands(), asm_out_file, ASM_OUTPUT_DEBUG_LABEL, ASM_OUTPUT_LABEL, asm_show_source(), assemble_external(), gcc_debug_hooks::begin_block, gcc_debug_hooks::begin_epilogue, block_depth, BLOCK_IN_COLD_SECTION_P, BLOCK_NUMBER, call_from_call_insn(), CALL_P, CC_STATUS_INIT, cfun, cleanup_subreg_operands(), clear_next_view_needed(), clone_function_name(), CODE_LABEL_NUMBER, cold_function_name, COND_EXEC_TEST, constrain_operands_cached(), current_function_decl, current_function_section(), current_insn_predicate, current_output_insn, debug_hooks, debug_insn, DEBUG_INSN_P, DECL_IGNORED_P, decode_asm_operands(), delete_insn(), rtx_insn::deleted(), DINFO_LEVEL_NORMAL, dump_flags, dump_insn_slim(), dwarf2_debug_info_emitted_p(), dwarf2out_do_frame(), dwarf2out_emit_cfi(), dwarf2out_switch_text_section(), dwarf_debuginfo_p(), dyn_cast(), gcc_debug_hooks::end_block, gcc_debug_hooks::end_prologue, exact_log2(), expand_location(), fatal_insn, fatal_insn_not_found, final_scan_insn(), final_sequence, force_source_line, gcc_assert, gcc_checking_assert, gcc_unreachable, GET_CODE, get_insn_template(), high_block_linenum, i, IDENTIFIER_POINTER, in_cold_section_p, gcc_debug_hooks::inline_entry, insn_counter, insn_noperands, JUMP_TABLE_DATA_P, jump_table_for_label(), JUMP_TABLES_IN_TEXT_SECTION, jumptable_relocatable(), gcc_debug_hooks::label, LABEL_ALT_ENTRY_P, LABEL_NAME, LABEL_TO_ALIGNMENT, last_columnnum, last_discriminator, last_filename, last_ignored_compare, last_linenum, align_flags::levels, LOCATION_BLOCK, align_flags_tuple::log, max_labelno, align_flags_tuple::maxskip, MAY_HAVE_DEBUG_MARKER_INSNS, maybe_output_next_view(), MEM_P, recog_data_d::n_operands, need_profile_function, NEXT_INSN(), NOTE_BLOCK, NOTE_CFI, NOTE_EH_HANDLER, NOTE_KIND, NOTE_LABEL_NUMBER, NOTE_MARKER_LOCATION, NOTE_P, notice_source_line(), NULL, NULL_RTX, recog_data_d::operand, output_alternate_entry_point(), output_asm_insn(), output_function_exception_table(), PATTERN(), peephole(), PREV_INSN(), prev_nonnote_insn(), print_rtl_single(), print_rtx_head, profile_after_prologue(), profile_function(), recog_data, recog_memoized(), SEEN_EMITTED, SEEN_NOTE, gcc_debug_hooks::set_ignored_loc, SET_NEXT_INSN(), set_next_view_needed(), SET_PREV_INSN(), gcc_debug_hooks::source_line, gcc_debug_hooks::switch_text_section, switch_to_section(), SYMBOL_REF_DECL, table, targetm, TDF_SLIM, this_is_asm_operands, TREE_ASM_WRITTEN, try_split(), gcc_debug_hooks::var_location, VMS_DEBUG, XEXP, XSTR, XVECEXP, and XVECLEN.
Referenced by final_scan_insn().
void final_start_function | ( | rtx_insn * | first, |
FILE * | file, | ||
int | optimize_p ) |
This is an exported final_start_function_1, callable without SEEN.
References final_start_function_1(), and gcc_assert.
|
static |
Output assembler code for the start of a function, and initialize some of the variables in this file for the new function. The label for the function and associated assembler pseudo-ops have already been output in `assemble_start_function'. FIRST is the first insn of the rtl for the function being compiled. FILE is the file to write assembler code to. SEEN should be initially set to zero, and it may be updated to indicate we have references to the next location view, that would require us to emit it at the current PC. OPTIMIZE_P is nonzero if we should eliminate redundant test and compare insns.
References gcc_debug_hooks::begin_prologue, block_depth, crtl, current_function_decl, debug_hooks, DECL_IGNORED_P, DECL_INITIAL, default_function_pro_epilogue(), dwarf2_debug_info_emitted_p(), dwarf2out_begin_prologue(), final_scan_insn(), force_source_line, get_frame_size(), high_block_linenum, high_function_linenum, in_initial_view_p(), last_columnnum, last_discriminator, last_filename, last_linenum, LOCATION_COLUMN, LOCATION_FILE, LOCATION_LINE, need_profile_function, NEXT_INSN(), NOTE_KIND, NOTE_P, NULL, number_blocks(), profile_after_prologue(), profile_function(), prologue_location, reemit_insn_block_notes(), gcc_debug_hooks::set_ignored_loc, targetm, this_is_asm_operands, TREE_ASM_WRITTEN, and warning().
Referenced by final_start_function(), and rest_of_handle_final().
void fprint_ul | ( | FILE * | f, |
unsigned long | value ) |
Write an unsigned long as decimal to a file, fast.
References i, and sprint_ul_rev().
void fprint_whex | ( | FILE * | f, |
unsigned HOST_WIDE_INT | value ) |
Write a HOST_WIDE_INT number in hex form 0x1234, fast.
References CHAR_BIT.
Referenced by dw2_asm_output_data(), dw2_asm_output_data_uleb128(), and dw2_assemble_integer().
int get_attr_length | ( | rtx_insn * | insn | ) |
Obtain the current length of an insn. If branch shortening has been done, get its actual length. Otherwise, get its maximum length.
References get_attr_length_1().
Referenced by output_asm_name().
Obtain the current length of an insn. If branch shortening has been done, get its actual length. Otherwise, use FALLBACK_FN to calculate the length.
References asm_insn_count(), asm_noperands(), dyn_cast(), get_attr_length_1(), GET_CODE, i, insn_lengths, insn_lengths_max_uid, INSN_UID(), and PATTERN().
Referenced by get_attr_length(), get_attr_length_1(), and get_attr_min_length().
int get_attr_min_length | ( | rtx_insn * | insn | ) |
Obtain the current length of an insn. If branch shortening has been done, get its actual length. Otherwise, get its minimum length.
References get_attr_length_1().
Referenced by can_dup_for_shrink_wrapping(), copy_bb_p(), get_uncond_jump_length(), maybe_duplicate_computed_goto(), and maybe_reset_location_view().
const char * get_insn_template | ( | int | code, |
rtx_insn * | insn ) |
Locate the proper template for the given insn-code.
References insn_data_d::function, gcc_assert, gcc_unreachable, insn_data, INSN_OUTPUT_FORMAT_FUNCTION, INSN_OUTPUT_FORMAT_MULTI, INSN_OUTPUT_FORMAT_SINGLE, insn_data_d::multi, recog_data_d::operand, insn_data_d::output, recog_data, insn_data_d::single, and which_alternative.
Referenced by default_print_patchable_function_entry(), and final_scan_insn_1().
If OP is a REG or MEM and we can find a MEM_EXPR corresponding to it or its address, return that expr . Set *PADDRESSP to 1 if the expr corresponds to the address of the object and 0 if to the object.
References expr, GET_CODE, get_mem_expr_from_op(), GET_RTX_CLASS, MEM_EXPR, MEM_P, REG_EXPR, REG_P, RTX_BIN_ARITH, UNARY_P, and XEXP.
Referenced by get_mem_expr_from_op(), and output_asm_operand_names().
const char * get_some_local_dynamic_name | ( | ) |
Locate some local-dynamic symbol still in use by this function so that we can print its name in local-dynamic base patterns. Return null if there are no local-dynamic references.
References ALL, CONSTANT_POOL_ADDRESS_P, FOR_EACH_SUBRTX, GET_CODE, get_insns(), get_pool_constant(), NEXT_INSN(), NONDEBUG_INSN_P, PATTERN(), some_local_dynamic_name, SYMBOL_REF_TLS_MODEL, TLS_MODEL_LOCAL_DYNAMIC, and XSTR.
|
static |
Grow the LABEL_ALIGN array after new labels are created.
References gcc_assert, label_align, max_label_num(), max_labelno, and min_labelno.
Referenced by shorten_branches(), and update_alignments().
We want to emit param bindings (before the first begin_stmt) in the initial view, if we are emitting views. To that end, we may consume initial notes in the function, processing them in final_start_function, before signaling the beginning of the prologue, rather than in final. We don't test whether the DECLs are PARM_DECLs: the assumption is that there will be a NOTE_INSN_BEGIN_STMT marker before any non-parameter NOTE_INSN_VAR_LOCATION. It's ok if the marker is not there, we'll just have more variable locations bound in the initial view, which is consistent with their being bound without any code that would give them a value.
References current_function_decl, DECL_IGNORED_P, GET_CODE, and NOTE_KIND.
Referenced by final(), and final_start_function_1().
void init_final | ( | const char * | filename | ) |
Initialize data in final at the beginning of a compilation.
References app_on, and final_sequence.
Referenced by do_compile().
void init_insn_lengths | ( | void | ) |
Indicate that branch shortening hasn't yet been done.
References free(), INSN_ADDRESSES_FREE, insn_lengths, insn_lengths_max_uid, uid_align, and uid_shuid.
Referenced by expand_thunk(), and rest_of_clean_state().
int insn_current_reference_address | ( | rtx_insn * | branch | ) |
Compute a worst-case reference address of a branch so that it can be safely used in the presence of aligned labels. Since the size of the branch itself is unknown, the size of the branch is not included in the range. I.e. for a forward branch, the reference address is the end address of the branch as known from the previous branch shortening pass, minus a value to account for possible size increase due to alignment. For a backward branch, it is the start address of the branch as known from the current pass, plus a value to account for possible size increase due to alignment. NB.: Therefore, the maximum offset allowed for backward branches needs to exclude the branch size.
References align_fuzz(), INSN_ADDRESSES_SET_P, insn_current_address, insn_last_address, insn_lengths, INSN_SHUID, INSN_UID(), JUMP_LABEL, jump_to_label_p(), length_unit_log, NEXT_INSN(), and PREV_INSN().
int insn_discriminator | ( | const rtx_insn * | insn | ) |
Return discriminator of the statement that produced this insn.
References compute_discriminator(), and INSN_LOCATION().
Referenced by notice_source_line(), and rtx_writer::print_rtx_operand_code_L().
bool jumptable_relocatable | ( | void | ) |
Judge if an absolute jump table is relocatable.
References CASE_VECTOR_PC_RELATIVE, and targetm.
Referenced by final_scan_insn_1().
align_flags label_to_alignment | ( | rtx | label | ) |
For the benefit of port specific code do this also as a function.
References CODE_LABEL_NUMBER, LABEL_TO_ALIGNMENT, and max_labelno.
bool leaf_function_p | ( | void | ) |
Return true if this function has no function calls.
References CALL_P, crtl, FAKE_CALL_P, gcc_assert, GET_CODE, get_insns(), in_sequence_p(), NEXT_INSN(), NONJUMP_INSN_P, PATTERN(), SIBLING_CALL_P, targetm, and XVECEXP.
Referenced by gen_call_used_regs_seq(), ira(), ira_setup_eliminable_regset(), and rest_of_handle_check_leaf_regs().
rtl_opt_pass * make_pass_clean_state | ( | gcc::context * | ctxt | ) |
rtl_opt_pass * make_pass_compute_alignments | ( | gcc::context * | ctxt | ) |
rtl_opt_pass * make_pass_final | ( | gcc::context * | ctxt | ) |
rtl_opt_pass * make_pass_shorten_branches | ( | gcc::context * | ctxt | ) |
|
inlinestatic |
Return the instance number assigned to DECL.
References DECL_P, decl_to_instance_map, and hash_map< KeyId, Value, Traits >::get().
Referenced by compute_discriminator().
void mark_symbol_refs_as_used | ( | rtx | x | ) |
Marks SYMBOL_REFs in x as referenced through use of assemble_external.
References ALL, assemble_external(), FOR_EACH_SUBRTX, GET_CODE, and SYMBOL_REF_DECL.
Referenced by output_operand().
|
inlinestatic |
Test whether we have a pending request to emit the next view in *SEEN, and emit it if needed, clearing the request bit.
References clear_next_view_needed(), debug_hooks, last_columnnum, last_discriminator, last_filename, last_linenum, SEEN_NEXT_VIEW, and gcc_debug_hooks::source_line.
Referenced by final_1(), and final_scan_insn_1().
void no_asm_to_stream | ( | FILE * | file | ) |
Default target hook that outputs nothing to a stream.
Return whether a source line note needs to be emitted before INSN. Sets IS_STMT to TRUE if the line should be marked as a possible breakpoint location.
References BUILTINS_LOCATION, compute_discriminator(), expand_location(), force_source_line, high_block_linenum, high_function_linenum, insn_discriminator(), INSN_HAS_LOCATION(), insn_location(), last_columnnum, last_discriminator, last_filename, last_linenum, LOCATION_LOCUS, MAX, NOTE_MARKER_LOCATION, NOTE_MARKER_P, NULL, override_columnnum, override_discriminator, override_filename, override_linenum, SUPPORTS_DISCRIMINATOR, and UNKNOWN_LOCATION.
Referenced by final_scan_insn_1().
void output_addr_const | ( | FILE * | file, |
rtx | x ) |
Print an integer constant expression in assembler syntax. Addition and subtraction are the only arithmetic that may appear in these expressions.
References assemble_external(), assemble_name(), CODE_LABEL_NUMBER, CONST_DOUBLE_AS_INT_P, CONST_DOUBLE_HIGH, CONST_DOUBLE_LOW, CONST_FIXED_VALUE_LOW, CONST_INT_P, CONST_WIDE_INT_ELT, CONST_WIDE_INT_NUNITS, wide_int_storage::from_array(), GET_CODE, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT_PRINT_DEC, HOST_WIDE_INT_PRINT_DOUBLE_HEX, HOST_WIDE_INT_PRINT_HEX, INTVAL, label_ref_label(), output_addr_const(), output_operand_lossage(), print_decs(), simplify_subtraction(), SYMBOL_REF_DECL, targetm, XEXP, and XSTR.
Referenced by assemble_integer_with_op(), dw2_assemble_integer(), dwarf2out_do_cfi_startproc(), output_addr_const(), and output_asm_insn().
void output_address | ( | machine_mode | mode, |
rtx | x ) |
Print a memory reference operand for address X using machine-dependent assembler syntax.
References asm_out_file, changed, targetm, and walk_alter_subreg().
Referenced by output_asm_insn().
|
static |
Emit the appropriate declaration for an alternate-entry-point symbol represented by INSN, to FILE. INSN is a CODE_LABEL with LABEL_KIND != LABEL_NORMAL. The case fall-through in this function is intentional.
References ASM_OUTPUT_LABEL, gcc_fallthrough, gcc_unreachable, LABEL_GLOBAL_ENTRY, LABEL_KIND, LABEL_NAME, LABEL_NORMAL, LABEL_STATIC_ENTRY, LABEL_WEAK_ENTRY, and targetm.
Referenced by final_scan_insn_1().
void output_asm_insn | ( | const char * | templ, |
rtx * | operands ) |
Output text from TEMPLATE to the assembler output file, obeying %-directions to substitute operands taken from the vector OPERANDS. %N (for N a digit) means print operand N in usual manner. %lN means require operand N to be a CODE_LABEL or LABEL_REF and print the label name with no punctuation. %cN means require operand N to be a constant and print the constant expression with no punctuation. %aN means expect operand N to be a memory address (not a memory reference!) and print a reference to that address. %nN means expect operand N to be a constant and print a constant expression for minus the value of the operand, with no other punctuation.
References asm_out_file, CONST_INT_P, CONSTANT_ADDRESS_P, HOST_WIDE_INT_PRINT_DEC, insn_counter, insn_noperands, INTVAL, NULL_RTX, output_addr_const(), output_address(), output_asm_label(), output_asm_name(), output_asm_operand_names(), output_operand(), output_operand_lossage(), targetm, and this_is_asm_operands.
Referenced by assemble_asm(), default_print_patchable_function_entry(), and final_scan_insn_1().
void output_asm_label | ( | rtx | x | ) |
Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol.
References asm_out_file, assemble_name(), CODE_LABEL_NUMBER, GET_CODE, LABEL_P, label_ref_label(), NOTE_KIND, NOTE_P, and output_operand_lossage().
Referenced by output_asm_insn().
|
static |
Output of assembler code from a template, and its subroutines.
Annotate the assembly with a comment describing the pattern and alternative used.
References ASM_COMMENT_START, asm_out_file, debug_insn, get_attr_length(), INSN_CODE, insn_cost(), insn_data, INSN_UID(), n_alternatives(), optimize_insn_for_speed_p(), and which_alternative.
Referenced by output_asm_insn().
|
static |
Output operand names for assembler instructions. OPERANDS is the operand vector, OPORDER is the order to write the operands, and NOPS is the number of operands to write.
References ASM_COMMENT_START, asm_out_file, get_mem_expr_from_op(), i, ORIGINAL_REGNO, print_mem_expr(), REG_P, and REGNO.
Referenced by output_asm_insn().
void output_operand | ( | rtx | x, |
int | code ) |
Print operand X using machine-dependent assembler syntax. CODE is a non-digit that preceded the operand-number in the % spec, such as 'z' if the spec was `%z3'. CODE is 0 if there was no char between the % and the digits. When CODE is a non-letter, X is 0. The meanings of the letters are machine-dependent and controlled by TARGET_PRINT_OPERAND.
References alter_subreg(), asm_out_file, gcc_assert, GET_CODE, mark_symbol_refs_as_used(), NULL_RTX, REG_P, REGNO, and targetm.
Referenced by output_asm_insn().
void output_operand_lossage | ( | const char * | cmsgid, |
... ) |
Report inconsistency between the assembler template and the operands. In an `asm', it's the user's fault; otherwise, the compiler's fault.
References _, ap, error_for_asm(), free(), internal_error(), and this_is_asm_operands.
Referenced by crash_signal(), output_addr_const(), output_asm_insn(), and output_asm_label().
void output_quoted_string | ( | FILE * | asm_file, |
const char * | string ) |
Output a quoted string.
Referenced by default_asm_output_source_filename(), and generic_type_p().
|
static |
References crtl, profile_function(), and targetm.
Referenced by final_scan_insn_1(), and final_start_function_1().
|
static |
References assemble_integer(), cfun, const0_rtx, current_function_decl, current_function_funcdef_no, current_function_section(), data_section, floor_log2(), LONG_TYPE_SIZE, MIN, NO_PROFILE_COUNTERS, NULL, REG_P, REGNO, switch_to_section(), targetm, and TREE_TYPE.
Referenced by final_scan_insn_1(), final_start_function_1(), and profile_after_prologue().
|
static |
Rebuild all the NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes based on the scope tree and the newly reordered instructions.
References active_insn_p(), BLOCK_SUPERCONTEXT, cfun, change_scope(), choose_inner_scope(), DECL_INITIAL, delete_insn(), dyn_cast(), emit_note(), emit_note_after(), emit_note_before(), get_insns(), i, INSN_LOCATION(), insn_scope(), JUMP_TABLE_DATA_P, LOCATION_BLOCK, NEXT_INSN(), NOTE_BLOCK, NOTE_KIND, NOTE_MARKER_LOCATION, NOTE_P, NULL, PATTERN(), reorder_blocks(), and UNKNOWN_LOCATION.
Referenced by final_start_function_1().
|
static |
References as_a(), CALL_P, cfun, CODE_LABEL_NUMBER, crtl, current_function_decl, decl_binds_to_current_def_p(), delete_tree_ssa(), dump_flags, dump_function_header(), epilogue_completed, error(), final_insns_dump_p, find_reg_note(), flag_rerun_cse_after_global_opts, fopen, free_after_compilation(), free_after_parsing(), free_bb_for_insn(), GET_CODE, get_insns(), init_insn_lengths(), init_recog_no_volatile(), init_temp_slots(), rtx_sequence::insn(), INSN_UID(), LABEL_P, NEXT_INSN(), NONJUMP_INSN_P, NOTE_KIND, NOTE_P, NULL, NULL_RTX, PATTERN(), pref, cgraph_rtl_info::preferred_incoming_stack_boundary, print_rtl_single(), reload_completed, remove_note(), cgraph_node::rtl_info(), set_block_for_insn(), SET_NEXT_INSN(), SET_PREV_INSN(), TDF_COMPARE_DEBUG, and TDF_NOUID.
|
static |
On some machines, a function with no call insns can run faster if it doesn't create its own register window. When output, the leaf function should use only the "output" registers. Ordinarily, the function would be compiled to use the "input" registers to find its arguments; it is a candidate for leaf treatment if it uses only the "input" registers. Leaf function treatment means renumbering so the function uses the "output" registers instead.
Turn the RTL into assembly.
References asm_out_file, assemble_end_function(), assemble_start_function(), collect_fn_hard_reg_usage(), crtl, current_function_decl, debug_hooks, DECL_ATTRIBUTES, decl_fini_priority_lookup(), DECL_IGNORED_P, decl_init_priority_lookup(), DECL_INITIAL, DECL_RTL, DECL_STATIC_CONSTRUCTOR, DECL_STATIC_DESTRUCTOR, delete_vta_debug_insns(), error_mark_node, final_1(), final_end_function(), final_start_function_1(), free_reg_info(), gcc_debug_hooks::function_decl, get_fnname_from_decl(), get_insns(), lookup_attribute(), MAY_HAVE_DEBUG_MARKER_INSNS, output_function_exception_table(), targetm, timevar_pop(), timevar_push(), and XEXP.
|
static |
References get_insns(), and shorten_branches().
Return true if INSN is a call to the current function.
References current_function_decl, decl_binds_to_current_def_p(), and get_call_fndecl().
Referenced by collect_fn_hard_reg_usage().
|
inlinestatic |
Arrange for us to emit a source location note before any further real insns or section changes, by setting the SEEN_NEXT_VIEW bit in *SEEN, as long as we are keeping track of location views. The bit indicates we have referenced the next view at the current PC, so we have to emit it. This should be called next to the var_location debug hook.
References SEEN_NEXT_VIEW.
Referenced by final_scan_insn_1().
void shorten_branches | ( | rtx_insn * | first | ) |
Make a pass over all insns and compute their actual lengths by shortening any branches of variable length if possible.
shorten_branches might be called multiple times: for example, the SH port splits out-of-range conditional branches in MACHINE_DEPENDENT_REORG. In order to do this, it needs proper length information, which it obtains by calling shorten_branches. This cannot be collapsed with shorten_branches itself into a single pass unless we also want to integrate reorg.cc, since the branch splitting exposes new instructions with delay slots.
References ADDR_DIFF_VEC_FLAGS, ADDR_VEC_ALIGN, align_fuzz(), as_a(), asm_insn_count(), asm_noperands(), BARRIER_P, addr_diff_vec_flags::base_after_vec, crtl, DEBUG_INSN_P, rtx_insn::deleted(), dyn_cast(), fatal_insn, free(), gcc_assert, gcc_checking_assert, GET_CODE, get_insns(), get_last_insn(), get_max_uid(), GET_MODE_SIZE(), grow_label_align(), i, rtx_sequence::insn(), INSN_ADDRESSES, INSN_ADDRESSES_ALLOC, insn_current_address, insn_current_align, insn_last_address, INSN_LENGTH_ALIGNMENT, insn_lengths, insn_lengths_max_uid, INSN_P, INSN_SHUID, INSN_UID(), JUMP_TABLE_DATA_P, jump_table_for_label(), JUMP_TABLES_IN_TEXT_SECTION, LABEL_ALIGN, LABEL_ALIGN_AFTER_BARRIER, LABEL_P, LABEL_TO_ALIGNMENT, rtx_sequence::len(), log(), align_flags::max(), addr_diff_vec_flags::max_after_base, addr_diff_vec_flags::max_after_vec, MAX_CODE_ALIGN, max_label_num(), max_labelno, max_uid, addr_diff_vec_flags::min_after_base, addr_diff_vec_flags::min_after_vec, addr_diff_vec_flags::min_align, min_align(), NEXT_INSN(), NONJUMP_INSN_P, NOTE_P, NULL_RTX, PATTERN(), PREV_INSN(), PUT_MODE(), readonly_data_section, safe_as_a(), table, text_section, uid_align, uid_shuid, XEXP, XVECEXP, and XVECLEN.
Referenced by rest_of_handle_shorten_branches().
int sprint_ul | ( | char * | s, |
unsigned long | value ) |
Write an unsigned long as decimal to a string, fast. s must be wide enough to not overflow, at least 21 chars. Returns the length of the string (without terminating '\0').
References sprint_ul_rev().
|
static |
Internal function that prints an unsigned long in decimal in reverse. The output string IS NOT null-terminated.
References i.
Referenced by fprint_ul(), and sprint_ul().
Update the already computed alignment information. LABEL_PAIRS is a vector made up of pairs of labels for which the alignment information of the first element will be copied from that of the second element.
References FOR_EACH_VEC_ELT, grow_label_align(), i, LABEL_TO_ALIGNMENT, max_label_num(), max_labelno, and NULL_RTX.
Referenced by dbr_schedule().
Do alter_subreg on all the SUBREGs contained in X.
References alter_subreg(), changed, GET_CODE, walk_alter_subreg(), and XEXP.
Referenced by cleanup_subreg_operands(), output_address(), and walk_alter_subreg().
|
static |
True if have enabled APP processing of our assembler output.
Referenced by app_disable(), app_enable(), and init_final().
|
static |
Number of unmatched NOTE_INSN_BLOCK_BEG notes we have seen.
Referenced by final_scan_insn_1(), and final_start_function_1().
rtx current_insn_predicate |
Nonnull if the insn currently being emitted was a COND_EXEC pattern.
Referenced by final_scan_insn_1().
rtx_insn* current_output_insn |
Last insn processed by final_scan_insn.
Referenced by final_scan_insn_1().
|
static |
Last insn processed by final_scan_insn.
Referenced by df_note_bb_compute(), final_scan_insn_1(), find_bb_boundaries(), and output_asm_name().
decl_to_instance_map_t* decl_to_instance_map |
Map DECLs to instance discriminators. This is allocated and defined in ada/gcc-interfaces/trans.cc, when compiling with -gnateS. Mappings from this table are saved and restored for LTO, so link-time compilation will have this map set, at least in partitions containing at least one DECL with an associated instance discriminator.
Referenced by compute_discriminator(), map_decl_to_instance(), maybe_create_decl_to_instance_map(), and output_struct_function_base().
bool final_insns_dump_p |
True if printing into -fdump-final-insns= dump.
Referenced by rtx_writer::print_rtx(), and rest_of_clean_state().
rtx_sequence* final_sequence |
If we are outputting an insn sequence, this contains the sequence rtx. Zero otherwise.
Referenced by dbr_sequence_length(), final_scan_insn_1(), and init_final().
Whether to force emission of a line note before the next insn.
Referenced by final_scan_insn_1(), final_start_function_1(), and notice_source_line().
|
static |
Highest line number in current block.
Referenced by final_scan_insn_1(), final_start_function_1(), and notice_source_line().
|
static |
Likewise for function.
Referenced by final_end_function(), final_start_function_1(), and notice_source_line().
vec<int> insn_addresses_ |
Macros to support INSN_ADDRESSES 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/>.
Referenced by insn_addresses_new().
|
static |
Assign a unique number to each insn that is output. This can be used to generate unique local labels.
Referenced by final_scan_insn_1(), and output_asm_insn().
int insn_current_address |
Address of insn being processed. Used by `insn_current_length'.
Referenced by final_1(), insn_current_reference_address(), and shorten_branches().
int insn_current_align |
known invariant alignment of insn being processed.
Referenced by shorten_branches().
int insn_last_address |
Address of insn being processed in previous iteration.
Referenced by final_1(), insn_current_reference_address(), and shorten_branches().
|
static |
The next two pages contain routines used to compute the length of an insn and to shorten branches.
Arrays for insn lengths, and addresses. The latter is referenced by `insn_current_length'.
Referenced by align_fuzz(), get_attr_length_1(), init_insn_lengths(), insn_current_reference_address(), and shorten_branches().
|
static |
Max uid for which the above arrays are valid.
Referenced by get_attr_length_1(), init_insn_lengths(), and shorten_branches().
unsigned int insn_noperands |
Number of operands of this insn, for an `asm' with operands.
Referenced by assemble_asm(), final_scan_insn_1(), and output_asm_insn().
|
static |
Referenced by compute_alignments(), and grow_label_align().
|
static |
Column number of last NOTE.
Referenced by final_scan_insn_1(), final_start_function_1(), maybe_output_next_view(), and notice_source_line().
|
static |
Discriminator written to assembly.
Referenced by final_scan_insn_1(), final_start_function_1(), maybe_output_next_view(), and notice_source_line().
|
static |
Filename of last NOTE.
Referenced by final_end_function(), final_scan_insn_1(), final_start_function_1(), maybe_output_next_view(), and notice_source_line().
|
static |
Compare optimization flag.
Referenced by final_1(), and final_scan_insn_1().
|
static |
Line number of last NOTE.
Referenced by final_end_function(), final_scan_insn_1(), final_start_function_1(), maybe_output_next_view(), and notice_source_line().
|
extern |
Referenced by insn_current_reference_address(), and write_length_unit_log().
|
static |
Referenced by compute_alignments(), final_scan_insn_1(), grow_label_align(), label_to_alignment(), shorten_branches(), and update_alignments().
|
static |
Referenced by compute_alignments(), grow_label_align(), and reload_combine().
|
static |
True if profile_function should be called, but hasn't been called yet.
Referenced by final_scan_insn_1(), and final_start_function_1().
|
static |
Referenced by notice_source_line().
|
static |
Referenced by notice_source_line().
|
static |
Override filename, line and column number.
Referenced by notice_source_line().
|
static |
Referenced by notice_source_line().
|
static |
Referenced by final_end_function(), and get_some_local_dynamic_name().
const rtx_insn* this_is_asm_operands |
Nonzero while outputting an `asm' with operands. This means that inconsistencies are the user's fault, so don't die. The precise value is the insn being output, to pass to error_for_asm.
Referenced by assemble_asm(), crash_signal(), final_scan_insn_1(), final_start_function_1(), output_asm_insn(), and output_operand_lossage().
|
static |
After shorten_branches, for any insn, uid_align[INSN_UID (insn)] gives the next following alignment insn that increases the known alignment, or NULL_RTX if there is no such insn. For any alignment obtained this way, we can again index uid_align with its uid to obtain the next following align that in turn increases the alignment, till we reach NULL_RTX; the sequence obtained this way for each insn we'll call the alignment chain of this insn in the following comments.
Referenced by align_fuzz(), init_insn_lengths(), and shorten_branches().
|
static |
Referenced by align_fuzz(), final_forward_branch_p(), init_insn_lengths(), and shorten_branches().