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

Go to the source code of this file.

Functions

enum reg_class lra_get_allocno_class (int regno)
rtx lra_eliminate_regs (rtx, machine_mode, rtx)
void lra (FILE *, int)
void lra_init_once (void)
void lra_finish_once (void)
const HARD_REG_SETlra_get_dependent_filter (int, machine_mode, unsigned int, machine_mode, bool)
void lra_reset_dependent_filters (void)

Variables

bool lra_simple_p

Function Documentation

◆ lra()

void lra ( FILE * f,
int verbose )
extern
Major LRA entry function.  F is a file should be used to dump LRA
debug info with given verbosity.   

References assign_stack_local(), bitmap_clear(), bitmap_empty_p(), bitmap_initialize(), bitmap_ones(), cfun, check_rtl(), commit_edge_insertions(), crtl, DF_NO_INSN_RESCAN, df_set_flags(), df_set_regs_ever_live(), emit_note(), EXECUTE_IF_SET_IN_BITMAP, expand_reg_info(), find_many_sub_basic_blocks(), finish_insn_recog_data(), finish_reg_info(), fixed_regs, fixup_abnormal_edges(), gen_reg_rtx(), get_frame_size(), get_insns(), get_last_insn(), get_max_uid(), has_nonexceptional_receiver(), i, init_insn_recog_data(), init_reg_info(), INT_MAX, ira_no_alloc_regs, ira_restore_scratches(), last_basic_block_for_fn, LOCAL_REGNO, lra_asm_error_p, lra_assign(), lra_assignment_iter, lra_assignment_iter_after_spill, lra_bad_spill_regno_start, lra_clear_live_ranges(), lra_coalesce(), lra_coalesce_iter, lra_constraint_insn_stack, lra_constraint_insn_stack_bitmap, lra_constraint_iter, lra_constraint_new_regno_start, lra_constraints(), lra_constraints_finish(), lra_constraints_init(), lra_create_live_ranges(), lra_curr_reload_num, lra_dump_file, lra_eliminate(), lra_final_code_change(), lra_finish_equiv(), lra_fp_pseudo_p(), lra_hard_reg_split_p, lra_in_progress, lra_inheritance(), lra_inheritance_iter, lra_inheritance_pseudos, lra_init_equiv(), lra_live_range_iter, lra_live_ranges_finish(), lra_live_ranges_init(), LRA_MAX_FAILED_SPLITS, LRA_MAX_INHERITANCE_PASSES, LRA_MAX_REMATERIALIZATION_PASSES, lra_need_for_scratch_reg_p(), lra_need_for_spills_p(), lra_new_regno_start, lra_no_alloc_regs, lra_optional_reload_pseudos, lra_pmode_pseudo, lra_postponed_insns, lra_push_insn_by_uid(), lra_reg_spill_p, lra_remat(), lra_rematerialization_iter, lra_reset_dependent_filters(), lra_simple_p, lra_spill(), lra_split_hard_reg_for(), lra_split_regs, lra_subreg_reload_pseudos, lra_undo_inheritance(), lra_undo_inheritance_iter, lra_verbose, max_reg_num(), NULL, push_insns(), reg_obstack, regstat_free_n_sets_and_refs(), regstat_free_ri(), reload_completed, remove_scratches(), sbitmap_alloc(), sbitmap_free(), setup_reg_spill_flag(), timevar_pop(), timevar_push(), unshare_all_rtl_again(), update_inc_notes(), and verbose.

Referenced by do_reload().

◆ lra_eliminate_regs()

rtx lra_eliminate_regs ( rtx x,
machine_mode mem_mode,
rtx insn )
extern
This function is used externally in subsequent passes of GCC.  It
always does a full elimination of X.      

References lra_eliminate_regs_1(), and NULL.

Referenced by based_loc_descr(), compute_frame_pointer_to_fb_displacement(), reg_loc_descriptor(), and vt_initialize().

◆ lra_finish_once()

void lra_finish_once ( void )
extern
Called once per compiler to finish LRA data which are initialize
once.   

References finish_insn_code_data_once(), and lra_finish_dependent_filter_cache().

Referenced by finalize().

◆ lra_get_allocno_class()

◆ lra_get_dependent_filter()

const HARD_REG_SET * lra_get_dependent_filter ( int id,
machine_mode mode,
unsigned int partner_regno,
machine_mode partner_mode,
bool is_ref )
extern
Return the set of hardregs allowed by dependent filter ID for an operand
of mode MODE when the referenced operand has PARTNER_REGNO in
PARTNER_MODE.  That is when IS_REF is false.  If it is true, the roles are
reversed and PARTNER_REGNO as well as PARTNER_MODE refer to the dependent
operand.

We fill the set for all hardregs and add the resulting regset to
a hash table if it doesn't already exist in it.   

References dependent_filter_htab, dependent_filter::id, dependent_filter::is_ref, dependent_filter::mode, dependent_filter::partner_mode, dependent_filter::partner_regno, and SET_HARD_REG_BIT.

Referenced by find_hard_regno_for_1(), get_dependent_filter(), and ira_dependent_filter().

◆ lra_init_once()

void lra_init_once ( void )
extern
Called once per compiler to initialize LRA data once.   

References init_insn_code_data_once(), and lra_init_dependent_filter_cache().

Referenced by ira_init_once().

◆ lra_reset_dependent_filters()

void lra_reset_dependent_filters ( void )
extern
Reset the dependent-filter cache.   

References dependent_filter_htab.

Referenced by ira(), and lra().

Variable Documentation

◆ lra_simple_p

bool lra_simple_p
extern
Communication between the Local Register Allocator (LRA) and
   the rest of the compiler.
   Copyright (C) 2010-2026 Free Software Foundation, Inc.
   Contributed by Vladimir Makarov <vmakarov@redhat.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/>.   
True if the current function is too big to use regular algorithms
in LRA. In other words, we should use simpler and faster algorithms
in LRA.  It also means we should not worry about generation code
for caller saves.  The value is set up in IRA.   

Referenced by assign_by_spills(), curr_insn_transform(), ira(), and lra().