GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "predict.h"
#include "df.h"
#include "regs.h"
Functions | |
void | regstat_init_n_sets_and_refs (void) |
void | regstat_free_n_sets_and_refs (void) |
static void | regstat_bb_compute_ri (basic_block bb, bitmap live) |
void | regstat_compute_ri (void) |
void | regstat_free_ri (void) |
bitmap | regstat_get_setjmp_crosses (void) |
static void | regstat_bb_compute_calls_crossed (unsigned int bb_index, bitmap live) |
void | regstat_compute_calls_crossed (void) |
void | regstat_free_calls_crossed (void) |
void | dump_reg_info (FILE *file) |
Variables | |
struct regstat_n_sets_and_refs_t * | regstat_n_sets_and_refs |
static bitmap | setjmp_crosses |
struct reg_info_t * | reg_info_p |
size_t | reg_info_p_size |
void dump_reg_info | ( | FILE * | file | ) |
Dump the register info to FILE.
References df, DF_REG_DEF_COUNT, DF_REG_USE_COUNT, i, max_reg_num(), NULL, NUM_FIXED_BLOCKS, print_dec(), PSEUDO_REGNO_BYTES, reg_alternate_class(), REG_BASIC_BLOCK, reg_class_names, reg_info_p_size, REG_N_CALLS_CROSSED, REG_N_DEATHS, REG_N_REFS(), REG_N_SETS(), REG_POINTER, reg_preferred_class(), REG_USERVAR_P, regno_reg_rtx, regstat_n_sets_and_refs, reload_completed, and SIGNED.
Referenced by compute_alignments(), reorder_basic_blocks(), rest_of_handle_if_conversion(), rtl_loop_init(), and variable_tracking_main_1().
|
static |
Compute calls crossed for BB. Live is a scratch bitvector.
References BASIC_BLOCK_FOR_FN, bitmap_clear_bit(), bitmap_copy(), bitmap_set_bit, CALL_P, cfun, df_get_live_out(), DF_INSN_INFO_GET, DF_INSN_SIZE, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, EXECUTE_IF_SET_IN_BITMAP, FOR_BB_INSNS_REVERSE, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_USE, gcc_assert, df_insn_info::insn, INSN_UID(), NONDEBUG_INSN_P, and REG_N_CALLS_CROSSED.
Referenced by regstat_compute_calls_crossed().
|
static |
Compute register info: lifetime, bb, and number of defs and uses for basic block BB. LIVE is a scratch bitvector used here.
References bitmap_clear_bit(), bitmap_copy(), bitmap_set_bit, CALL_P, df_get_live_out(), DF_INSN_INFO_GET, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, EXECUTE_IF_SET_IN_BITMAP, find_reg_note(), FOR_BB_INSNS_REVERSE, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_USE, basic_block_def::index, df_insn_info::insn, MIN, NONDEBUG_INSN_P, NULL, REG_BASIC_BLOCK, REG_BLOCK_GLOBAL, REG_BLOCK_UNKNOWN, REG_FREQ, REG_FREQ_FROM_BB, REG_FREQ_MAX, REG_N_CALLS_CROSSED, REG_N_DEATHS, REG_NOTE_KIND, REG_NOTES, REGNO, setjmp_crosses, and XEXP.
Referenced by regstat_compute_ri().
void regstat_compute_calls_crossed | ( | void | ) |
Compute register info: lifetime, bb, and number of defs and uses.
References BITMAP_ALLOC, BITMAP_FREE, cfun, df_bitmap_obstack, FOR_EACH_BB_FN, gcc_assert, basic_block_def::index, max_reg_num(), max_regno, reg_info_p, reg_info_p_size, regstat_bb_compute_calls_crossed(), timevar_pop(), and timevar_push().
void regstat_compute_ri | ( | void | ) |
Compute register info: lifetime, bb, and number of defs and uses.
References BITMAP_ALLOC, BITMAP_FREE, cfun, df_bitmap_obstack, EXECUTE_IF_SET_IN_BITMAP, FOR_EACH_BB_FN, gcc_assert, max_reg_num(), max_regno, REG_BASIC_BLOCK, REG_BLOCK_UNKNOWN, reg_info_p, reg_info_p_size, regstat_bb_compute_ri(), setjmp_crosses, timevar_pop(), and timevar_push().
Referenced by find_moveable_pseudos(), and ira().
void regstat_free_calls_crossed | ( | void | ) |
Free all storage associated with the problem.
References free(), gcc_assert, NULL, reg_info_p, and reg_info_p_size.
void regstat_free_n_sets_and_refs | ( | void | ) |
Free the array that holds the REG_N_SETS and REG_N_REFS.
References free(), gcc_assert, NULL, and regstat_n_sets_and_refs.
Referenced by do_reload(), find_moveable_pseudos(), ira(), lra(), move_loop_invariants(), one_code_hoisting_pass(), and rest_of_handle_combine().
void regstat_free_ri | ( | void | ) |
Free all storage associated with the problem.
References BITMAP_FREE, free(), gcc_assert, NULL, reg_info_p, reg_info_p_size, and setjmp_crosses.
Referenced by do_reload(), find_moveable_pseudos(), ira(), and lra().
bitmap regstat_get_setjmp_crosses | ( | void | ) |
Return a bitmap containing the set of registers that cross a setjmp. The client should not change or delete this bitmap.
References setjmp_crosses.
Referenced by assign_spill_hard_regs(), coalesce_spill_slots(), generate_setjmp_warnings(), and update_equiv_regs().
void regstat_init_n_sets_and_refs | ( | void | ) |
If a pass need to change these values in some magical way or the pass needs to have accurate values for these and is not using incremental df scanning, then it should use REG_N_SETS and REG_N_USES. If the pass is doing incremental scanning then it should be getting the info from DF_REG_DEF_COUNT and DF_REG_USE_COUNT.
References DEBUG_INSN_P, df_grow_reg_info(), DF_REF_INSN, DF_REF_INSN_INFO, DF_REF_NEXT_REG, DF_REG_DEF_COUNT, DF_REG_USE_CHAIN, DF_REG_USE_COUNT, gcc_assert, i, max_reg_num(), max_regno, MAY_HAVE_DEBUG_BIND_INSNS, REG_N_SETS(), regstat_n_sets_and_refs, SET_REG_N_REFS, SET_REG_N_SETS, timevar_pop(), and timevar_push().
Referenced by find_moveable_pseudos(), ira(), move_loop_invariants(), one_code_hoisting_pass(), and rest_of_handle_combine().
struct reg_info_t* reg_info_p |
Referenced by regstat_compute_calls_crossed(), regstat_compute_ri(), regstat_free_calls_crossed(), and regstat_free_ri().
size_t reg_info_p_size |
The number allocated elements of reg_info_p.
Referenced by dump_reg_info(), regstat_compute_calls_crossed(), regstat_compute_ri(), regstat_free_calls_crossed(), and regstat_free_ri().
struct regstat_n_sets_and_refs_t* regstat_n_sets_and_refs |
Scanning of rtl for dataflow analysis. Copyright (C) 2007-2024 Free Software Foundation, Inc. Contributed by Kenneth Zadeck (zadeck@naturalbridge.com). This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later 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 dump_reg_info(), REG_N_REFS(), REG_N_SETS(), regstat_free_n_sets_and_refs(), and regstat_init_n_sets_and_refs().
|
static |