GCC Middle and Back End API Reference
lra-lives.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "predict.h"
#include "df.h"
#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
#include "ira.h"
#include "recog.h"
#include "cfganal.h"
#include "sparseset.h"
#include "lra-int.h"
#include "target.h"
#include "function-abi.h"
Include dependency graph for lra-lives.cc:

Data Structures

class  bb_data_pseudos
 

Typedefs

typedef class bb_data_pseudosbb_data_t
 

Enumerations

enum  point_type { DEF_POINT , USE_POINT }
 

Functions

static void free_live_range_list (lra_live_range_t lr)
 
static lra_live_range_t create_live_range (int regno, int start, int finish, lra_live_range_t next)
 
static lra_live_range_t copy_live_range (lra_live_range_t r)
 
lra_live_range_t lra_copy_live_range_list (lra_live_range_t r)
 
lra_live_range_t lra_merge_live_ranges (lra_live_range_t r1, lra_live_range_t r2)
 
bool lra_intersected_live_ranges_p (lra_live_range_t r1, lra_live_range_t r2)
 
static bool sparseset_contains_pseudos_p (sparseset a)
 
static void update_pseudo_point (int regno, int point, enum point_type type)
 
static void make_hard_regno_live (int regno)
 
static void make_hard_regno_dead (int regno)
 
static void mark_pseudo_live (int regno)
 
static void mark_pseudo_dead (int regno)
 
static void mark_regno_live (int regno, machine_mode mode)
 
static void mark_regno_dead (int regno, machine_mode mode)
 
static bb_data_t get_bb_data (basic_block bb)
 
static bb_data_t get_bb_data_by_index (int index)
 
static bool live_trans_fun (int bb_index)
 
static void live_con_fun_0 (basic_block bb)
 
static bool live_con_fun_n (edge e)
 
static void initiate_live_solver (void)
 
static void finish_live_solver (void)
 
static void next_program_point (int &point, int freq)
 
void lra_setup_reload_pseudo_preferenced_hard_reg (int regno, int hard_regno, int profit)
 
static void check_pseudos_live_through_calls (int regno, const function_abi &abi)
 
static bool reg_early_clobber_p (const struct lra_insn_reg *reg, int n_alt)
 
static void clear_sparseset_regnos (sparseset set, int regno, enum machine_mode mode)
 
static bool regnos_in_sparseset_p (sparseset set, int regno, enum machine_mode mode)
 
static bool process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p)
 
static void remove_some_program_points_and_update_live_ranges (void)
 
void lra_print_live_range_list (FILE *f, lra_live_range_t r)
 
DEBUG_FUNCTION void debug (lra_live_range &ref)
 
DEBUG_FUNCTION void debug (lra_live_range *ptr)
 
void lra_debug_live_range_list (lra_live_range_t r)
 
static void print_pseudo_live_ranges (FILE *f, int regno)
 
void lra_debug_pseudo_live_ranges (int regno)
 
static void print_live_ranges (FILE *f)
 
void lra_debug_live_ranges (void)
 
static void compress_live_ranges (void)
 
static bool lra_create_live_ranges_1 (bool all_p, bool dead_insn_p)
 
void lra_create_live_ranges (bool all_p, bool dead_insn_p)
 
void lra_clear_live_ranges (void)
 
void lra_live_ranges_init (void)
 
void lra_live_ranges_finish (void)
 

Variables

int lra_live_max_point
 
int lra_hard_reg_usage [FIRST_PSEUDO_REGISTER]
 
static bool complete_info_p
 
static sparseset pseudos_live
 
static sparseset pseudos_live_through_calls
 
static sparseset pseudos_live_through_setjumps
 
static HARD_REG_SET hard_regs_live
 
static sparseset start_living
 
static sparseset start_dying
 
static sparseset unused_set
 
static sparseset dead_set
 
static bitmap_head temp_bitmap
 
static object_allocator< lra_live_rangelra_live_range_pool ("live ranges")
 
static bitmap bb_killed_pseudos
 
static bitmap bb_gen_pseudos
 
static bb_data_t bb_data
 
static bitmap_head all_hard_regs_bitmap
 
static bitmap_head all_blocks
 
static rtx_insncurr_insn
 
static lra_insn_recog_data_t curr_id
 
static struct lra_static_insn_datacurr_static_id
 
static vec< int > point_freq_vec
 
int * lra_point_freq
 
int lra_live_range_iter
 

Typedef Documentation

◆ bb_data_t

Array for all BB data.  Indexed by the corresponding BB index.   

Enumeration Type Documentation

◆ point_type

Enumerator
DEF_POINT 
USE_POINT 

Function Documentation

◆ check_pseudos_live_through_calls()

static void check_pseudos_live_through_calls ( int regno,
const function_abi & abi )
inlinestatic
Check whether REGNO lives through calls and setjmps and clear
the corresponding bits in PSEUDOS_LIVE_THROUGH_CALLS and
PSEUDOS_LIVE_THROUGH_SETJUMPS.  All calls in the region described
by PSEUDOS_LIVE_THROUGH_CALLS have the given ABI.   

References lra_reg::conflict_hard_regs, lra_reg_info, function_abi::mode_clobbers(), PSEUDO_REGNO_MODE, pseudos_live_through_calls, pseudos_live_through_setjumps, SET_HARD_REG_SET, sparseset_bit_p(), and sparseset_clear_bit().

Referenced by process_bb_lives().

◆ clear_sparseset_regnos()

static void clear_sparseset_regnos ( sparseset set,
int regno,
enum machine_mode mode )
static
Clear pseudo REGNO in SET or all hard registers of REGNO in MODE in SET.   

References dead_set, end_hard_regno(), ggc_alloc(), last, and sparseset_clear_bit().

Referenced by process_bb_lives().

◆ compress_live_ranges()

static void compress_live_ranges ( void )
static

◆ copy_live_range()

static lra_live_range_t copy_live_range ( lra_live_range_t r)
static
Copy live range R and return the result.   

References lra_live_range_pool, and r.

Referenced by lra_copy_live_range_list().

◆ create_live_range()

static lra_live_range_t create_live_range ( int regno,
int start,
int finish,
lra_live_range_t next )
static
Create and return pseudo live range with given attributes.   

References lra_live_range::finish, lra_live_range_pool, lra_live_range::next, lra_live_range::regno, and lra_live_range::start.

Referenced by update_pseudo_point().

◆ debug() [1/2]

◆ debug() [2/2]

References debug, and ggc_alloc().

◆ finish_live_solver()

static void finish_live_solver ( void )
static
Free all data needed for global pseudo live analysis.   

References all_blocks, all_hard_regs_bitmap, bb_data_pseudos::bb, bitmap_clear(), cfun, FOR_ALL_BB_FN, free(), get_bb_data(), and ggc_alloc().

Referenced by lra_live_ranges_finish().

◆ free_live_range_list()

static void free_live_range_list ( lra_live_range_t lr)
static
Free live range list LR.   

References ggc_alloc(), lra_live_range_pool, and NULL.

Referenced by lra_clear_live_ranges().

◆ get_bb_data()

static bb_data_t get_bb_data ( basic_block bb)
inlinestatic
Two small functions for access to the bb data.   

References bb_data_pseudos::bb.

Referenced by finish_live_solver(), initiate_live_solver(), live_trans_fun(), lra_create_live_ranges_1(), and process_bb_lives().

◆ get_bb_data_by_index()

static bb_data_t get_bb_data_by_index ( int index)
inlinestatic

Referenced by live_trans_fun().

◆ initiate_live_solver()

static void initiate_live_solver ( void )
static

◆ live_con_fun_0()

static void live_con_fun_0 ( basic_block bb)
static
The confluence function used by the DF equation solver to set up
live info for a block BB without predecessor.   

References all_hard_regs_bitmap, bb_data_pseudos::bb, bitmap_and_into(), and df_get_live_out().

Referenced by lra_create_live_ranges_1().

◆ live_con_fun_n()

static bool live_con_fun_n ( edge e)
static
The confluence function used by the DF equation solver to propagate
 live info from successor to predecessor on edge E according to the
 following equation:

    bb.liveout = 0 for entry block | OR (livein of successors)

References all_hard_regs_bitmap, bb_data_pseudos::bb, bitmap_ior_and_compl_into(), df_get_live_in(), df_get_live_out(), and ggc_alloc().

Referenced by lra_create_live_ranges_1().

◆ live_trans_fun()

static bool live_trans_fun ( int bb_index)
static
The transfer function used by the DF equation solver to propagate
  live info through block with BB_INDEX according to the following
  equation:

    bb.livein = (bb.liveout - bb.kill) OR bb.gen

References all_hard_regs_bitmap, bb_data_pseudos::bb, bitmap_and_compl(), bitmap_ior_and_compl(), df_get_live_in(), df_get_live_out(), get_bb_data(), get_bb_data_by_index(), ggc_alloc(), and temp_bitmap.

Referenced by lra_create_live_ranges_1().

◆ lra_clear_live_ranges()

void lra_clear_live_ranges ( void )
Finish all live ranges.   

References free_live_range_list(), i, lra_reg_info, max_reg_num(), and point_freq_vec.

Referenced by lra(), and lra_create_live_ranges().

◆ lra_copy_live_range_list()

lra_live_range_t lra_copy_live_range_list ( lra_live_range_t r)
Copy live range list given by its head R and return the result.   

References copy_live_range(), lra_live_range::next, NULL, and r.

Referenced by add_pseudo_to_slot(), and merge_pseudos().

◆ lra_create_live_ranges()

void lra_create_live_ranges ( bool all_p,
bool dead_insn_p )
The main entry function creates live-ranges and other live info
necessary for the assignment sub-pass.  It uses
lra_creates_live_ranges_1 -- so read comments for the
function.   

References ggc_alloc(), lra_assert, lra_clear_live_ranges(), lra_create_live_ranges_1(), lra_dump_file, and NULL.

Referenced by lra().

◆ lra_create_live_ranges_1()

static bool lra_create_live_ranges_1 ( bool all_p,
bool dead_insn_p )
static
The function creates live ranges only for memory pseudos (or for
all ones if ALL_P), set up CONFLICT_HARD_REGS for the pseudos.  It
also does dead insn elimination if DEAD_INSN_P and global live
analysis only for pseudos and only if the pseudo live info was
changed on a BB border.  Return TRUE if the live info was
changed.   

References all_blocks, all_hard_regs_bitmap, BASIC_BLOCK_FOR_FN, lra_reg::biggest_mode, bitmap_clear_bit(), bitmap_clear_range(), cfun, CLEAR_HARD_REG_SET, complete_info_p, compress_live_ranges(), curr_point, dead_set, DF_BACKWARD, df_get_live_in(), df_get_live_out(), df_get_n_blocks(), df_get_postorder(), df_simple_dataflow(), ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, FOR_EACH_BB_FN, free(), lra_reg::freq, get_bb_data(), get_max_uid(), GET_MODE, ggc_alloc(), HARD_REGISTER_NUM_P, hard_regs_spilled_into, i, basic_block_def::index, inverted_rev_post_order_compute(), live_con_fun_0(), live_con_fun_n(), lra_reg::live_ranges, live_trans_fun(), lra_assert, lra_dump_bitmap_with_title(), lra_dump_file, lra_free_copies(), lra_hard_reg_usage, lra_live_max_point, lra_live_range_iter, lra_point_freq, lra_reg_info, max_reg_num(), max_regno, n_basic_blocks_for_fn, NULL, NULL_RTX, point_freq_vec, lra_reg::preferred_hard_regno1, lra_reg::preferred_hard_regno2, lra_reg::preferred_hard_regno_profit1, lra_reg::preferred_hard_regno_profit2, print_live_ranges(), process_bb_lives(), pseudos_live, pseudos_live_through_calls, pseudos_live_through_setjumps, reg_renumber, regno_reg_rtx, sparseset_alloc(), sparseset_free, start_dying, start_living, TEST_HARD_REG_BIT, timevar_pop(), timevar_push(), and unused_set.

Referenced by lra_create_live_ranges().

◆ lra_debug_live_range_list()

void lra_debug_live_range_list ( lra_live_range_t r)
Print live ranges R to stderr.   

References ggc_alloc(), lra_print_live_range_list(), and r.

◆ lra_debug_live_ranges()

void lra_debug_live_ranges ( void )
Print live ranges of all pseudos to stderr.    

References ggc_alloc(), and print_live_ranges().

◆ lra_debug_pseudo_live_ranges()

void lra_debug_pseudo_live_ranges ( int regno)
Print live ranges of pseudo REGNO to stderr.    

References ggc_alloc(), print_pseudo_live_ranges(), and lra_insn_reg::regno.

◆ lra_intersected_live_ranges_p()

bool lra_intersected_live_ranges_p ( lra_live_range_t r1,
lra_live_range_t r2 )
Return TRUE if live ranges R1 and R2 intersect.   

References ggc_alloc(), and NULL.

Referenced by assign_stack_slot_num_and_sort_pseudos(), and lra_coalesce().

◆ lra_live_ranges_finish()

void lra_live_ranges_finish ( void )
Finish live ranges data once per function.   

References bitmap_clear(), finish_live_solver(), lra_live_range_pool, and temp_bitmap.

Referenced by lra().

◆ lra_live_ranges_init()

void lra_live_ranges_init ( void )
Initialize live ranges data once per function.   

References bitmap_initialize(), initiate_live_solver(), reg_obstack, and temp_bitmap.

Referenced by lra().

◆ lra_merge_live_ranges()

lra_live_range_t lra_merge_live_ranges ( lra_live_range_t r1,
lra_live_range_t r2 )
Merge *non-intersected* ranges R1 and R2 and returns the result.
The function maintains the order of ranges and tries to minimize
size of the result range list.  Ranges R1 and R2 may not be used
after the call.   

References gcc_assert, ggc_alloc(), last, lra_assert, lra_live_range_pool, filedep::next, and NULL.

Referenced by add_pseudo_to_slot(), and merge_pseudos().

◆ lra_print_live_range_list()

void lra_print_live_range_list ( FILE * f,
lra_live_range_t r )
Print live ranges R to file F.   

References ggc_alloc(), NULL, and r.

Referenced by debug(), lra_debug_live_range_list(), and print_pseudo_live_ranges().

◆ lra_setup_reload_pseudo_preferenced_hard_reg()

void lra_setup_reload_pseudo_preferenced_hard_reg ( int regno,
int hard_regno,
int profit )

◆ make_hard_regno_dead()

static void make_hard_regno_dead ( int regno)
static

◆ make_hard_regno_live()

static void make_hard_regno_live ( int regno)
static
Record hard register REGNO as now being live.  It updates
living hard regs and START_LIVING.   

References bb_gen_pseudos, bitmap_set_bit, eliminable_regset, fixed_regs, HARD_REGISTER_NUM_P, hard_regs_live, hard_regs_spilled_into, lra_assert, SET_HARD_REG_BIT, sparseset_set_bit(), start_living, and TEST_HARD_REG_BIT.

Referenced by mark_regno_live(), and process_bb_lives().

◆ mark_pseudo_dead()

static void mark_pseudo_dead ( int regno)
static

◆ mark_pseudo_live()

static void mark_pseudo_live ( int regno)
static
Mark pseudo REGNO as now being live and update START_LIVING.   

References HARD_REGISTER_NUM_P, lra_assert, pseudos_live, sparseset_bit_p(), sparseset_set_bit(), and start_living.

Referenced by mark_regno_live(), and process_bb_lives().

◆ mark_regno_dead()

static void mark_regno_dead ( int regno,
machine_mode mode )
static
Mark register REGNO (pseudo or hard register) in MODE as being dead
and update BB_GEN_PSEUDOS and BB_KILLED_PSEUDOS.   

References bb_gen_pseudos, bb_killed_pseudos, bitmap_clear_bit(), bitmap_set_bit, end_hard_regno(), HARD_REGISTER_NUM_P, last, make_hard_regno_dead(), and mark_pseudo_dead().

Referenced by process_bb_lives().

◆ mark_regno_live()

static void mark_regno_live ( int regno,
machine_mode mode )
static
Mark register REGNO (pseudo or hard register) in MODE as being live
and update BB_GEN_PSEUDOS.   

References bb_gen_pseudos, bitmap_set_bit, end_hard_regno(), HARD_REGISTER_NUM_P, last, make_hard_regno_live(), and mark_pseudo_live().

Referenced by process_bb_lives().

◆ next_program_point()

static void next_program_point ( int & point,
int freq )
static
Increment the current program point POINT to the next point which has
execution frequency FREQ.   

References ggc_alloc(), lra_point_freq, and point_freq_vec.

Referenced by process_bb_lives().

◆ print_live_ranges()

static void print_live_ranges ( FILE * f)
static
Print live ranges of all pseudos to file F.    

References ggc_alloc(), i, max_reg_num(), max_regno, and print_pseudo_live_ranges().

Referenced by compress_live_ranges(), lra_create_live_ranges_1(), and lra_debug_live_ranges().

◆ print_pseudo_live_ranges()

static void print_pseudo_live_ranges ( FILE * f,
int regno )
static
Print live ranges of pseudo REGNO to file F.    

References ggc_alloc(), lra_print_live_range_list(), lra_reg_info, NULL, and lra_insn_reg::regno.

Referenced by lra_debug_pseudo_live_ranges(), and print_live_ranges().

◆ process_bb_lives()

static bool process_bb_lives ( basic_block bb,
int & curr_point,
bool dead_insn_p )
static
Process insns of the basic block BB to update pseudo live ranges,
pseudo hard register conflicts, and insn notes.  We do it on
backward scan of BB insns.  CURR_POINT is the program point where
BB ends.  The function updates this counter and returns in
CURR_POINT the program point where BB starts.  The function also
does local live info updates and can delete the dead insns if
DEAD_INSN_P.  It returns true if pseudo live info was
changed at the BB start.   

References add_reg_note(), bb_gen_pseudos, bb_has_abnormal_pred(), bb_has_eh_pred(), bb_killed_pseudos, lra_insn_reg::biggest_mode, bitmap_bit_p, bitmap_clear(), bitmap_copy(), bitmap_set_bit, CALL_P, cfun, check_pseudos_live_through_calls(), CLEAR_HARD_REG_BIT, CLEAR_HARD_REG_SET, clear_sparseset_regnos(), complete_info_p, curr_id, curr_insn, curr_point, curr_static_id, dead_set, DEF_POINT, default_function_abi, df_get_live_in(), df_get_live_out(), eh_edge_abi, EH_RETURN_DATA_REGNO, EXECUTE_IF_SET_IN_BITMAP, EXECUTE_IF_SET_IN_SPARSESET, find_reg_note(), FOR_BB_INSNS_REVERSE_SAFE, get_bb_data(), GET_MODE, ggc_alloc(), HARD_REGISTER_NUM_P, HARD_REGISTER_P, lra_static_insn_data::hard_regs, hard_regs_live, hard_regs_spilled_into, has_abnormal_call_or_eh_pred_edge_p(), i, basic_block_def::index, lra_insn_recog_data::insn, insn_callee_abi(), INSN_UID(), INVALID_REGNUM, lra_constraint_new_regno_start, lra_create_copy(), lra_dump_file, lra_get_insn_recog_data(), lra_hard_reg_usage, lra_reg_info, lra_reg_val_equal_p(), lra_set_insn_deleted(), lra_setup_reload_pseudo_preferenced_hard_reg(), lra_substitute_pseudo_within_insn(), lra_update_biggest_mode(), lra_update_insn_regno_info(), make_hard_regno_dead(), make_hard_regno_live(), mark_pseudo_dead(), mark_pseudo_live(), mark_regno_dead(), mark_regno_live(), may_trap_p(), lra_insn_reg::next, next_program_point(), non_conflicting_reg_copy_p(), NONDEBUG_INSN_P, NULL, NULL_RTX, offset, OP_IN, OP_INOUT, OP_OUT, PATTERN(), pic_offset_table_rtx, pseudos_live, pseudos_live_through_calls, pseudos_live_through_setjumps, reg_early_clobber_p(), REG_FREQ_FROM_BB, REG_NOTE_KIND, REG_NOTES, REG_P, reg_renumber, REG_SET_TO_HARD_REG_SET, lra_insn_reg::regno, REGNO, regno_reg_rtx, regnos_in_sparseset_p(), SET_DEST, SET_HARD_REG_BIT, SET_SRC, single_set(), sparseset_and_compl(), sparseset_bit_p(), sparseset_cardinality(), sparseset_clear(), sparseset_clear_bit(), sparseset_contains_pseudos_p(), sparseset_copy(), sparseset_ior(), sparseset_set_bit(), start_dying, start_living, lra_insn_reg::subreg_p, targetm, temp_bitmap, TEST_HARD_REG_BIT, lra_insn_reg::type, unused_set, update_pseudo_point(), USE_POINT, volatile_refs_p(), and XEXP.

Referenced by lra_create_live_ranges_1().

◆ reg_early_clobber_p()

static bool reg_early_clobber_p ( const struct lra_insn_reg * reg,
int n_alt )
inlinestatic
Return true if insn REG is an early clobber operand in alternative
NALT.  Negative NALT means that we don't know the current insn
alternative.  So assume the worst.   

References lra_insn_reg::early_clobber_alts, ggc_alloc(), LRA_NON_CLOBBERED_ALT, LRA_UNKNOWN_ALT, and TEST_BIT.

Referenced by process_bb_lives().

◆ regnos_in_sparseset_p()

static bool regnos_in_sparseset_p ( sparseset set,
int regno,
enum machine_mode mode )
static
Return true if pseudo REGNO is in SET or all hard registers of REGNO in MODE
are in SET.   

References dead_set, end_hard_regno(), ggc_alloc(), last, and sparseset_bit_p().

Referenced by process_bb_lives().

◆ remove_some_program_points_and_update_live_ranges()

static void remove_some_program_points_and_update_live_ranges ( void )
static
Compress pseudo live ranges by removing program points where
nothing happens.  Complexity of many algorithms in LRA is linear
function of program points number.  To speed up the code we try to
minimize the number of the program points here.   

References bitmap_bit_p, bitmap_clear(), bitmap_ior(), bitmap_set_bit, EXECUTE_IF_SET_IN_BITMAP, free(), ggc_alloc(), i, lra_assert, lra_dump_file, lra_live_max_point, lra_live_range_pool, lra_point_freq, lra_reg_info, map, MAX, max_reg_num(), max_regno, NULL, and r.

Referenced by compress_live_ranges().

◆ sparseset_contains_pseudos_p()

static bool sparseset_contains_pseudos_p ( sparseset a)
static
Return TRUE if set A contains a pseudo register, otherwise, return FALSE.   

References a, EXECUTE_IF_SET_IN_SPARSESET, and HARD_REGISTER_NUM_P.

Referenced by process_bb_lives().

◆ update_pseudo_point()

static void update_pseudo_point ( int regno,
int point,
enum point_type type )
static
Mark pseudo REGNO as living or dying at program point POINT, depending on
whether TYPE is a definition or a use.  If this is the first reference to
REGNO that we've encountered, then create a new live range for it.   

References complete_info_p, create_live_range(), DEF_POINT, lra_live_range::finish, ggc_alloc(), HARD_REGISTER_NUM_P, lra_reg::live_ranges, lra_assert, lra_get_regno_hard_regno(), lra_reg_info, NULL, pseudos_live, and sparseset_bit_p().

Referenced by process_bb_lives().

Variable Documentation

◆ all_blocks

bitmap_head all_blocks
static
Indexes of all function blocks.   

Referenced by finish_live_solver(), initiate_live_solver(), and lra_create_live_ranges_1().

◆ all_hard_regs_bitmap

bitmap_head all_hard_regs_bitmap
static

◆ bb_data

bb_data_t bb_data
static
All basic block data are referred through the following array.   

◆ bb_gen_pseudos

◆ bb_killed_pseudos

bitmap bb_killed_pseudos
static
The corresponding bitmaps of BB currently being processed.   

Referenced by make_hard_regno_dead(), mark_regno_dead(), and process_bb_lives().

◆ complete_info_p

bool complete_info_p
static
A global flag whose true value says to build live ranges for all
pseudos, otherwise the live ranges only for pseudos got memory is
build.  True value means also building copies and setting up hard
register preferences.  The complete info is necessary only for the
assignment pass.  The complete info is not needed for the
coalescing and spill passes.      

Referenced by lra_create_live_ranges_1(), process_bb_lives(), and update_pseudo_point().

◆ curr_id

lra_insn_recog_data_t curr_id
static
The insn data.   

Referenced by process_bb_lives().

◆ curr_insn

rtx_insn* curr_insn
static
Insn currently scanned.   

Referenced by process_bb_lives().

◆ curr_static_id

struct lra_static_insn_data* curr_static_id
static
The insn static data.   

Referenced by process_bb_lives().

◆ dead_set

◆ hard_regs_live

HARD_REG_SET hard_regs_live
static
Set of hard regs (except eliminable ones) currently live.   

Referenced by make_hard_regno_dead(), make_hard_regno_live(), mark_pseudo_dead(), and process_bb_lives().

◆ lra_hard_reg_usage

int lra_hard_reg_usage[FIRST_PSEUDO_REGISTER]
Accumulated execution frequency of all references for each hard
register.   

Referenced by find_hard_regno_for_1(), lra_create_live_ranges_1(), lra_setup_reg_renumber(), process_bb_lives(), and setup_live_pseudos_and_spill_after_risky_transforms().

◆ lra_live_max_point

int lra_live_max_point
Build live ranges for pseudos.
   Copyright (C) 2010-2024 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/>.   
This file contains code to build pseudo live-ranges (analogous
structures used in IRA, so read comments about the live-ranges
there) and other info necessary for other passes to assign
hard-registers to pseudos, coalesce the spilled pseudos, and assign
stack memory slots to spilled pseudos.   
Program points are enumerated by numbers from range
0..LRA_LIVE_MAX_POINT-1.  There are approximately two times more
program points than insns.  Program points are places in the
program where liveness info can be changed.     In most general case
(there are more complicated cases too) some program points
correspond to places where input operand dies and other ones
correspond to places where output operands are born.      

Referenced by assign_spill_hard_regs(), create_live_range_start_chains(), init_live_reload_and_inheritance_pseudos(), init_lives(), lra_create_live_ranges_1(), and remove_some_program_points_and_update_live_ranges().

◆ lra_live_range_iter

int lra_live_range_iter
The number of the current live range pass.   

Referenced by lra(), and lra_create_live_ranges_1().

◆ lra_live_range_pool

◆ lra_point_freq

int* lra_point_freq
The start of the above vector elements.   

Referenced by lra_create_live_ranges_1(), next_program_point(), and remove_some_program_points_and_update_live_ranges().

◆ point_freq_vec

vec<int> point_freq_vec
static
Vec containing execution frequencies of program points.   

Referenced by lra_clear_live_ranges(), lra_create_live_ranges_1(), and next_program_point().

◆ pseudos_live

sparseset pseudos_live
static

◆ pseudos_live_through_calls

sparseset pseudos_live_through_calls
static
Pseudos probably living through calls and setjumps.  As setjump is
a call too, if a bit in PSEUDOS_LIVE_THROUGH_SETJUMPS is set up
then the corresponding bit in PSEUDOS_LIVE_THROUGH_CALLS is set up
too.     These data are necessary for cases when only one subreg of a
multi-reg pseudo is set up after a call.  So we decide it is
probably live when traversing bb backward.  We are sure about
living when we see its usage or definition of the pseudo.   

Referenced by check_pseudos_live_through_calls(), lra_create_live_ranges_1(), and process_bb_lives().

◆ pseudos_live_through_setjumps

sparseset pseudos_live_through_setjumps
static

◆ start_dying

◆ start_living

sparseset start_living
static
Set of pseudos and hard registers start living/dying in the current
insn.  These sets are used to update REG_DEAD and REG_UNUSED notes
in the insn.   

Referenced by lra_create_live_ranges_1(), make_hard_regno_live(), mark_pseudo_live(), and process_bb_lives().

◆ temp_bitmap

bitmap_head temp_bitmap
static
Bitmap used for holding intermediate bitmap operation results.   

Referenced by live_trans_fun(), lra_live_ranges_finish(), lra_live_ranges_init(), and process_bb_lives().

◆ unused_set

sparseset unused_set
static
Set of pseudos and hard regs dead and unused in the current
insn.   

Referenced by lra_create_live_ranges_1(), and process_bb_lives().