GCC Middle and Back End API Reference
df-problems.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "df.h"
#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "cfganal.h"
#include "dce.h"
#include "valtrack.h"
#include "dumpfile.h"
#include "rtl-iter.h"
#include "regs.h"
#include "function-abi.h"
Include dependency graph for df-problems.cc:

Data Structures

class  df_rd_problem_data
 
struct  df_lr_problem_data
 
struct  df_live_problem_data
 
struct  df_mir_problem_data
 
struct  df_word_lr_problem_data
 
struct  df_md_problem_data
 

Macros

#define REG_DEAD_DEBUGGING   0
 
#define DF_SPARSE_THRESHOLD   32
 
#define df_chain_problem_p(FLAG)   (((enum df_chain_flags)df_chain->local_flags)&(FLAG))
 
#define MEMREF_NORMAL   1
 
#define MEMREF_VOLATILE   2
 

Functions

void df_chain_dump (struct df_link *link, FILE *file)
 
void df_print_bb_index (basic_block bb, FILE *file)
 
static void df_rd_free_bb_info (basic_block bb, void *vbb_info)
 
static void df_rd_alloc (bitmap all_blocks)
 
void df_rd_simulate_artificial_defs_at_top (basic_block bb, bitmap local_rd)
 
void df_rd_simulate_one_insn (basic_block bb, rtx_insn *insn, bitmap local_rd)
 
static void df_rd_bb_local_compute_process_def (class df_rd_bb_info *bb_info, df_ref def, int top_flag)
 
static void df_rd_bb_local_compute (unsigned int bb_index)
 
static void df_rd_local_compute (bitmap all_blocks)
 
static void df_rd_init_solution (bitmap all_blocks)
 
static bool df_rd_confluence_n (edge e)
 
static bool df_rd_transfer_function (int bb_index)
 
static void df_rd_free (void)
 
static void df_rd_start_dump (FILE *file)
 
static void df_rd_dump_defs_set (bitmap defs_set, const char *prefix, FILE *file)
 
static void df_rd_top_dump (basic_block bb, FILE *file)
 
static void df_rd_bottom_dump (basic_block bb, FILE *file)
 
void df_rd_add_problem (void)
 
static void df_lr_free_bb_info (basic_block bb, void *vbb_info)
 
static void df_lr_alloc (bitmap all_blocks)
 
static void df_lr_reset (bitmap all_blocks)
 
static void df_lr_bb_local_compute (unsigned int bb_index)
 
static void df_lr_local_compute (bitmap all_blocks)
 
static void df_lr_init (bitmap all_blocks)
 
static void df_lr_confluence_0 (basic_block bb)
 
static bool df_lr_confluence_n (edge e)
 
static bool df_lr_transfer_function (int bb_index)
 
static void df_lr_finalize (bitmap all_blocks)
 
static void df_lr_free (void)
 
static void df_lr_top_dump (basic_block bb, FILE *file)
 
static void df_lr_bottom_dump (basic_block bb, FILE *file)
 
static void df_lr_verify_solution_start (void)
 
static void df_lr_verify_solution_end (void)
 
void df_lr_add_problem (void)
 
void df_lr_verify_transfer_functions (void)
 
static void df_live_free_bb_info (basic_block bb, void *vbb_info)
 
static void df_live_alloc (bitmap all_blocks)
 
static void df_live_reset (bitmap all_blocks)
 
static void df_live_bb_local_compute (unsigned int bb_index)
 
static void df_live_local_compute (bitmap all_blocks)
 
static void df_live_init (bitmap all_blocks)
 
static bool df_live_confluence_n (edge e)
 
static bool df_live_transfer_function (int bb_index)
 
static void df_live_finalize (bitmap all_blocks)
 
static void df_live_free (void)
 
static void df_live_top_dump (basic_block bb, FILE *file)
 
static void df_live_bottom_dump (basic_block bb, FILE *file)
 
static void df_live_verify_solution_start (void)
 
static void df_live_verify_solution_end (void)
 
void df_live_add_problem (void)
 
void df_live_set_all_dirty (void)
 
void df_live_verify_transfer_functions (void)
 
static void df_mir_free_bb_info (basic_block bb, void *vbb_info)
 
static void df_mir_alloc (bitmap all_blocks)
 
static void df_mir_reset (bitmap all_blocks)
 
static void df_mir_bb_local_compute (unsigned int bb_index)
 
static void df_mir_local_compute (bitmap all_blocks)
 
static void df_mir_init (bitmap all_blocks)
 
static void df_mir_confluence_0 (basic_block bb)
 
static bool df_mir_confluence_n (edge e)
 
static bool df_mir_transfer_function (int bb_index)
 
static void df_mir_free (void)
 
static void df_mir_top_dump (basic_block bb, FILE *file)
 
static void df_mir_bottom_dump (basic_block bb, FILE *file)
 
static void df_mir_verify_solution_start (void)
 
static void df_mir_verify_solution_end (void)
 
void df_mir_add_problem (void)
 
void df_mir_simulate_one_insn (basic_block bb, rtx_insn *insn, bitmap kill, bitmap gen)
 
struct df_linkdf_chain_create (df_ref src, df_ref dst)
 
static void df_chain_unlink_1 (df_ref ref, df_ref target)
 
void df_chain_unlink (df_ref ref)
 
void df_chain_copy (df_ref to_ref, struct df_link *from_ref)
 
static void df_chain_remove_problem (void)
 
static void df_chain_fully_remove_problem (void)
 
static void df_chain_alloc (bitmap all_blocks)
 
static void df_chain_reset (bitmap blocks_to_clear)
 
static void df_chain_create_bb_process_use (bitmap local_rd, df_ref use, int top_flag)
 
static void df_chain_create_bb (unsigned int bb_index)
 
static void df_chain_finalize (bitmap all_blocks)
 
static void df_chain_free (void)
 
static void df_chain_bb_dump (basic_block bb, FILE *file, bool top)
 
static void df_chain_top_dump (basic_block bb, FILE *file)
 
static void df_chain_bottom_dump (basic_block bb, FILE *file)
 
static void df_chain_insn_top_dump (const rtx_insn *insn, FILE *file)
 
static void df_chain_insn_bottom_dump (const rtx_insn *insn, FILE *file)
 
void df_chain_add_problem (unsigned int chain_flags)
 
static void df_word_lr_free_bb_info (basic_block bb, void *vbb_info)
 
static void df_word_lr_alloc (bitmap all_blocks)
 
static void df_word_lr_reset (bitmap all_blocks)
 
bool df_word_lr_mark_ref (df_ref ref, bool is_set, regset live)
 
static void df_word_lr_bb_local_compute (unsigned int bb_index)
 
static void df_word_lr_local_compute (bitmap all_blocks)
 
static void df_word_lr_init (bitmap all_blocks)
 
static bool df_word_lr_confluence_n (edge e)
 
static bool df_word_lr_transfer_function (int bb_index)
 
static void df_word_lr_free (void)
 
static void df_word_lr_top_dump (basic_block bb, FILE *file)
 
static void df_word_lr_bottom_dump (basic_block bb, FILE *file)
 
void df_word_lr_add_problem (void)
 
bool df_word_lr_simulate_defs (rtx_insn *insn, bitmap live)
 
void df_word_lr_simulate_uses (rtx_insn *insn, bitmap live)
 
static void df_note_alloc (bitmap all_blocks)
 
static void df_print_note (const char *prefix, rtx_insn *insn, rtx note)
 
static bool df_ignore_stack_reg (int regno)
 
static void df_remove_dead_and_unused_notes (rtx_insn *insn)
 
static void df_remove_dead_eq_notes (rtx_insn *insn, bitmap live)
 
static void df_set_note (enum reg_note note_type, rtx_insn *insn, rtx reg)
 
static bool df_whole_mw_reg_unused_p (struct df_mw_hardreg *mws, bitmap live, bitmap artificial_uses)
 
static void df_set_unused_notes_for_mw (rtx_insn *insn, struct df_mw_hardreg *mws, bitmap live, bitmap do_not_gen, bitmap artificial_uses, struct dead_debug_local *debug)
 
static bool df_whole_mw_reg_dead_p (struct df_mw_hardreg *mws, bitmap live, bitmap artificial_uses, bitmap do_not_gen)
 
static void df_set_dead_notes_for_mw (rtx_insn *insn, struct df_mw_hardreg *mws, bitmap live, bitmap do_not_gen, bitmap artificial_uses, bool *added_notes_p)
 
static void df_create_unused_note (rtx_insn *insn, df_ref def, bitmap live, bitmap artificial_uses, struct dead_debug_local *debug)
 
static void df_note_bb_compute (unsigned int bb_index, bitmap live, bitmap do_not_gen, bitmap artificial_uses)
 
static void df_note_compute (bitmap all_blocks)
 
static void df_note_free (void)
 
void df_note_add_problem (void)
 
void df_simulate_find_defs (rtx_insn *insn, bitmap defs)
 
static void df_simulate_find_uses (rtx_insn *insn, bitmap uses)
 
void df_simulate_find_noclobber_defs (rtx_insn *insn, bitmap defs)
 
void df_simulate_defs (rtx_insn *insn, bitmap live)
 
void df_simulate_uses (rtx_insn *insn, bitmap live)
 
static void df_simulate_fixup_sets (basic_block bb, bitmap live)
 
void df_simulate_initialize_backwards (basic_block bb, bitmap live)
 
void df_simulate_one_insn_backwards (basic_block bb, rtx_insn *insn, bitmap live)
 
void df_simulate_finalize_backwards (basic_block bb, bitmap live)
 
void df_simulate_initialize_forwards (basic_block bb, bitmap live)
 
void df_simulate_one_insn_forwards (basic_block bb, rtx_insn *insn, bitmap live)
 
static int find_memory (rtx_insn *insn)
 
static void find_memory_stores (rtx x, const_rtx pat, void *data)
 
void simulate_backwards_to_point (basic_block bb, regset live, rtx point)
 
bool can_move_insns_across (rtx_insn *from, rtx_insn *to, rtx_insn *across_from, rtx_insn *across_to, basic_block merge_bb, regset merge_live, regset other_branch_live, rtx_insn **pmove_upto)
 
static void df_md_free_bb_info (basic_block bb, void *vbb_info)
 
static void df_md_alloc (bitmap all_blocks)
 
void df_md_simulate_artificial_defs_at_top (basic_block bb, bitmap local_md)
 
void df_md_simulate_one_insn (basic_block bb, rtx_insn *insn, bitmap local_md)
 
static void df_md_bb_local_compute_process_def (class df_md_bb_info *bb_info, df_ref def, int top_flag)
 
static void df_md_bb_local_compute (unsigned int bb_index)
 
static void df_md_local_compute (bitmap all_blocks)
 
static void df_md_reset (bitmap all_blocks)
 
static bool df_md_transfer_function (int bb_index)
 
static void df_md_init (bitmap all_blocks)
 
static void df_md_confluence_0 (basic_block bb)
 
static bool df_md_confluence_n (edge e)
 
static void df_md_free (void)
 
static void df_md_top_dump (basic_block bb, FILE *file)
 
static void df_md_bottom_dump (basic_block bb, FILE *file)
 
void df_md_add_problem (void)
 

Variables

static bitmap_head seen_in_block
 
static bitmap_head seen_in_insn
 
static const struct df_problem problem_RD
 
static const struct df_problem problem_LR
 
static bitmap_head df_live_scratch
 
static const struct df_problem problem_LIVE
 
static const struct df_problem problem_MIR
 
static const struct df_problem problem_CHAIN
 
static const struct df_problem problem_WORD_LR
 
static const struct df_problem problem_NOTE
 
static bitmap_head df_md_scratch
 
static const struct df_problem problem_MD
 

Macro Definition Documentation

◆ df_chain_problem_p

◆ DF_SPARSE_THRESHOLD

#define DF_SPARSE_THRESHOLD   32

◆ MEMREF_NORMAL

#define MEMREF_NORMAL   1
Used by the next two functions to encode information about the
memory references we found.   

Referenced by can_move_insns_across(), find_memory(), and find_memory_stores().

◆ MEMREF_VOLATILE

#define MEMREF_VOLATILE   2

◆ REG_DEAD_DEBUGGING

#define REG_DEAD_DEBUGGING   0
Standard problems for dataflow support routines.
   Copyright (C) 1999-2024 Free Software Foundation, Inc.
   Originally contributed by Michael P. Hayes
             (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
   Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
             and 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/>.   
Note that turning REG_DEAD_DEBUGGING on will cause
gcc.c-torture/unsorted/dump-noaddr.c to fail because it prints
addresses in the dumps.   

Referenced by df_create_unused_note(), df_note_bb_compute(), df_remove_dead_and_unused_notes(), df_remove_dead_eq_notes(), df_set_dead_notes_for_mw(), and df_set_unused_notes_for_mw().

Function Documentation

◆ can_move_insns_across()

bool can_move_insns_across ( rtx_insn * from,
rtx_insn * to,
rtx_insn * across_from,
rtx_insn * across_to,
basic_block merge_bb,
regset merge_live,
regset other_branch_live,
rtx_insn ** pmove_upto )
Return true if it is safe to move a group of insns, described by
the range FROM to TO, backwards across another group of insns,
described by ACROSS_FROM to ACROSS_TO.  It is assumed that there
are no insns between ACROSS_TO and FROM, but they may be in
different basic blocks; MERGE_BB is the block from which the
insns will be moved.  The caller must pass in a regset MERGE_LIVE
which specifies the registers live after TO.

This function may be called in one of two cases: either we try to
move identical instructions from all successor blocks into their
predecessor, or we try to move from only one successor block.  If
OTHER_BRANCH_LIVE is nonnull, it indicates that we're dealing with
the second case.  It should contain a set of registers live at the
end of ACROSS_TO which must not be clobbered by moving the insns.
In that case, we're also more careful about moving memory references
and trapping insns.

We return false if it is not safe to move the entire group, but it
may still be possible to move a subgroup.  PMOVE_UPTO, if nonnull,
is set to point at the last moveable insn in such a case.   

References BITMAP_ALLOC, bitmap_and_compl_into(), bitmap_and_into(), bitmap_copy(), BITMAP_FREE, bitmap_intersect_p(), CALL_P, df_simulate_defs(), df_simulate_find_defs(), df_simulate_find_uses(), df_simulate_initialize_backwards(), df_simulate_one_insn_backwards(), df_simulate_uses(), EXECUTE_IF_SET_IN_BITMAP, find_memory(), find_memory_stores(), fixed_regs, ggc_alloc(), global_regs, i, df_insn_info::insn, may_trap_or_fault_p(), may_trap_p(), MEMREF_NORMAL, MEMREF_VOLATILE, NEXT_INSN(), NONDEBUG_INSN_P, NOTE_KIND, NOTE_P, note_stores(), NULL, NULL_RTX, PATTERN(), PREV_INSN(), reg_obstack, reload_completed, RTL_CONST_OR_PURE_CALL_P, targetm, and volatile_insn_p().

Referenced by dead_or_predicable(), and try_head_merge_bb().

◆ df_chain_add_problem()

void df_chain_add_problem ( unsigned int chain_flags)
Create a new DATAFLOW instance and add it to an existing instance
of DF.  The returned structure is what is used to get at the
solution.   

References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_chain, ggc_alloc(), and problem_CHAIN.

Referenced by find_and_remove_re(), find_defs(), init_dce(), and iv_analysis_loop_init().

◆ df_chain_alloc()

static void df_chain_alloc ( bitmap all_blocks)
static
Create def-use or use-def chains.   

References df_chain, and df_chain_remove_problem().

◆ df_chain_bb_dump()

◆ df_chain_bottom_dump()

static void df_chain_bottom_dump ( basic_block bb,
FILE * file )
static

References df_chain_bb_dump().

◆ df_chain_copy()

void df_chain_copy ( df_ref to_ref,
struct df_link * from_ref )
Copy the du or ud chain starting at FROM_REF and attach it to
TO_REF.   

References df_chain_create(), and ggc_alloc().

◆ df_chain_create()

struct df_link * df_chain_create ( df_ref src,
df_ref dst )
Create a du or ud chain from SRC to DST and link it into SRC.    

References df_chain, DF_REF_CHAIN, and link::next.

Referenced by df_chain_copy(), and df_chain_create_bb_process_use().

◆ df_chain_create_bb()

◆ df_chain_create_bb_process_use()

static void df_chain_create_bb_process_use ( bitmap local_rd,
df_ref use,
int top_flag )
static

◆ df_chain_dump()

void df_chain_dump ( struct df_link * link,
FILE * file )
Generic versions to get the void* version of the block info.  Only
used inside the problem instance vectors.   
Dump a def-use or use-def chain for REF to FILE.   

References DF_REF_BBNO, DF_REF_FLAGS, DF_REF_ID, DF_REF_IN_NOTE, DF_REF_INSN_UID, DF_REF_IS_ARTIFICIAL, DF_REF_REG_DEF_P, ggc_alloc(), and link::next.

Referenced by debug_df_chain(), df_chain_bb_dump(), df_chain_insn_bottom_dump(), df_chain_insn_top_dump(), df_ref_debug(), and df_refs_chain_dump().

◆ df_chain_finalize()

static void df_chain_finalize ( bitmap all_blocks)
static
Create def-use chains from reaching use bitmaps for basic blocks
in BLOCKS.   

References all_blocks, df_chain_create_bb(), and EXECUTE_IF_SET_IN_BITMAP.

◆ df_chain_free()

static void df_chain_free ( void )
static
Free all storage associated with the problem.   

References BITMAP_FREE, df_chain, and free().

◆ df_chain_fully_remove_problem()

static void df_chain_fully_remove_problem ( void )
static
Remove the chain problem completely.   

References BITMAP_FREE, df_chain, df_chain_remove_problem(), and free().

◆ df_chain_insn_bottom_dump()

◆ df_chain_insn_top_dump()

◆ df_chain_remove_problem()

◆ df_chain_reset()

static void df_chain_reset ( bitmap blocks_to_clear)
static
Reset all of the chains when the set of basic blocks changes.   

References df_chain_remove_problem().

◆ df_chain_top_dump()

static void df_chain_top_dump ( basic_block bb,
FILE * file )
static

References df_chain_bb_dump().

◆ df_chain_unlink()

void df_chain_unlink ( df_ref ref)
Delete a du or ud chain that leave or point to REF.   

References df_chain, df_chain_unlink_1(), DF_REF_CHAIN, df_link::next, NULL, and df_link::ref.

Referenced by df_ref_chain_delete_du_chain(), and df_reg_chain_unlink().

◆ df_chain_unlink_1()

static void df_chain_unlink_1 ( df_ref ref,
df_ref target )
static
Delete any du or ud chains that start at REF and point to
TARGET.   

References df_chain, DF_REF_CHAIN, df_link::next, NULL, and df_link::ref.

Referenced by df_chain_unlink().

◆ df_create_unused_note()

static void df_create_unused_note ( rtx_insn * insn,
df_ref def,
bitmap live,
bitmap artificial_uses,
struct dead_debug_local * debug )
static
Create a REG_UNUSED note if necessary for DEF in INSN updating
LIVE.  Do not generate notes for registers in ARTIFICIAL_USES.   

References bitmap_bit_p, dead_debug_insert_temp(), debug, DEBUG_TEMP_AFTER_WITH_REG, df_ignore_stack_reg(), df_print_note(), df_ref_debug(), DF_REF_FLAGS, DF_REF_LOC, DF_REF_MW_HARDREG, DF_REF_REAL_LOC, DF_REF_REG, DF_REF_REGNO, df_set_note(), dump_file, ggc_alloc(), REG_DEAD_DEBUGGING, and REG_NOTES.

Referenced by df_note_bb_compute().

◆ df_ignore_stack_reg()

static bool df_ignore_stack_reg ( int regno)
inlinestatic
After reg-stack, the x86 floating point stack regs are difficult to
analyze because of all of the pushes, pops and rotations.  Thus, we
just leave the notes alone.  

Referenced by df_create_unused_note(), df_note_bb_compute(), and df_remove_dead_and_unused_notes().

◆ df_live_add_problem()

void df_live_add_problem ( void )
Create a new DATAFLOW instance and add it to an existing instance
of DF.  The returned structure is what is used to get at the
solution.   

References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_live, and problem_LIVE.

Referenced by do_reload(), doloop_optimize_loops(), if_convert(), initialize_uninitialized_regs(), move_loop_invariants(), reorg_loops(), rest_of_handle_df_initialize(), and try_shrink_wrapping_separate().

◆ df_live_alloc()

static void df_live_alloc ( bitmap all_blocks)
static

◆ df_live_bb_local_compute()

◆ df_live_bottom_dump()

static void df_live_bottom_dump ( basic_block bb,
FILE * file )
static

◆ df_live_confluence_n()

static bool df_live_confluence_n ( edge e)
static
Forward confluence function that ignores fake edges.   

References bitmap_ior_into(), df_live_get_bb_info(), ggc_alloc(), df_live_bb_info::in, and df_live_bb_info::out.

◆ df_live_finalize()

static void df_live_finalize ( bitmap all_blocks)
static
And the LR info with the may-initialized registers to produce the LIVE info.   

References all_blocks, bitmap_and_into(), df_live, df_live_get_bb_info(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, and ggc_alloc().

◆ df_live_free()

static void df_live_free ( void )
static
Free all storage associated with the problem.   

References BITMAP_FREE, bitmap_obstack_release(), bitmap_release(), df_live, df_live_scratch, free(), df_live_problem_data::live_bitmaps, and NULL.

◆ df_live_free_bb_info()

static void df_live_free_bb_info ( basic_block bb,
void * vbb_info )
static
Free basic block info.   

References bitmap_clear(), and ggc_alloc().

◆ df_live_init()

static void df_live_init ( bitmap all_blocks)
static

◆ df_live_local_compute()

static void df_live_local_compute ( bitmap all_blocks)
static
Compute local uninitialized register info.   

References bitmap_clear(), df_grow_insn_info(), df_live, df_live_bb_local_compute(), and EXECUTE_IF_SET_IN_BITMAP.

◆ df_live_reset()

static void df_live_reset ( bitmap all_blocks)
static
Reset the global solution for recalculation.   

References all_blocks, bitmap_clear(), df_live_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, and ggc_alloc().

◆ df_live_set_all_dirty()

void df_live_set_all_dirty ( void )
Set all of the blocks as dirty.  This needs to be done if this
problem is added after all of the insns have been scanned.   

References bitmap_set_bit, cfun, df_live, FOR_ALL_BB_FN, and basic_block_def::index.

Referenced by do_reload(), doloop_optimize_loops(), if_convert(), initialize_uninitialized_regs(), move_loop_invariants(), reorg_loops(), and try_shrink_wrapping_separate().

◆ df_live_top_dump()

static void df_live_top_dump ( basic_block bb,
FILE * file )
static

◆ df_live_transfer_function()

static bool df_live_transfer_function ( int bb_index)
static

◆ df_live_verify_solution_end()

static void df_live_verify_solution_end ( void )
static
Compare the saved datastructure and the new solution to the dataflow
equations.   

References bitmap_clear(), bitmap_equal_p(), cfun, df_live, DF_LIVE_IN, DF_LIVE_OUT, FOR_ALL_BB_FN, free(), gcc_unreachable, df_live_problem_data::in, basic_block_def::index, NULL, and df_live_problem_data::out.

◆ df_live_verify_solution_start()

static void df_live_verify_solution_start ( void )
static

◆ df_live_verify_transfer_functions()

◆ df_lr_add_problem()

void df_lr_add_problem ( void )
Create a new DATAFLOW instance and add it to an existing instance
of DF.  The returned structure is what is used to get at the
solution.   

References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_lr, and problem_LR.

Referenced by rest_of_handle_df_initialize().

◆ df_lr_alloc()

static void df_lr_alloc ( bitmap all_blocks)
static
Allocate or reset bitmaps for DF_LR blocks. The solution bits are
not touched unless the block is new.   

References bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), df_grow_bb_info(), df_lr, df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, ggc_alloc(), df_lr_problem_data::in, df_lr_problem_data::lr_bitmaps, NULL, and df_lr_problem_data::out.

Referenced by df_lr_finalize().

◆ df_lr_bb_local_compute()

◆ df_lr_bottom_dump()

static void df_lr_bottom_dump ( basic_block bb,
FILE * file )
static

◆ df_lr_confluence_0()

static void df_lr_confluence_0 ( basic_block bb)
static
Confluence function that processes infinite loops.  This might be a
noreturn function that throws.  And even if it isn't, getting the
unwind info right helps debugging.   

References bitmap_copy(), cfun, df, df_lr_get_bb_info(), EXIT_BLOCK_PTR_FOR_FN, df_d::hardware_regs_used, basic_block_def::index, and df_lr_bb_info::out.

◆ df_lr_confluence_n()

static bool df_lr_confluence_n ( edge e)
static

◆ df_lr_finalize()

◆ df_lr_free()

static void df_lr_free ( void )
static
Free all storage associated with the problem.   

References BITMAP_FREE, bitmap_obstack_release(), df_lr, free(), df_lr_problem_data::lr_bitmaps, and NULL.

◆ df_lr_free_bb_info()

static void df_lr_free_bb_info ( basic_block bb,
void * vbb_info )
static
Free basic block info.   

References bitmap_clear(), and ggc_alloc().

◆ df_lr_init()

static void df_lr_init ( bitmap all_blocks)
static
Initialize the solution vectors.   

References all_blocks, bitmap_clear(), bitmap_copy(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, and ggc_alloc().

◆ df_lr_local_compute()

◆ df_lr_reset()

static void df_lr_reset ( bitmap all_blocks)
static
Reset the global solution for recalculation.   

References all_blocks, bitmap_clear(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, and ggc_alloc().

◆ df_lr_top_dump()

static void df_lr_top_dump ( basic_block bb,
FILE * file )
static

◆ df_lr_transfer_function()

static bool df_lr_transfer_function ( int bb_index)
static

◆ df_lr_verify_solution_end()

static void df_lr_verify_solution_end ( void )
static
Compare the saved datastructure and the new solution to the dataflow
equations.   

References bitmap_clear(), bitmap_equal_p(), cfun, df_lr, DF_LR_IN, DF_LR_OUT, FOR_ALL_BB_FN, free(), gcc_unreachable, df_lr_problem_data::in, basic_block_def::index, NULL, and df_lr_problem_data::out.

◆ df_lr_verify_solution_start()

static void df_lr_verify_solution_start ( void )
static

◆ df_lr_verify_transfer_functions()

◆ df_md_add_problem()

void df_md_add_problem ( void )
Create a new MD instance and add it to the existing instance
of DF.   

References df_add_problem(), and problem_MD.

◆ df_md_alloc()

static void df_md_alloc ( bitmap all_blocks)
static
Allocate or reset bitmaps for DF_MD. The solution bits are
not touched unless the block is new.   

References all_blocks, bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), df_grow_bb_info(), df_md, df_md_get_bb_info(), df_md_scratch, EXECUTE_IF_SET_IN_BITMAP, ggc_alloc(), and df_md_problem_data::md_bitmaps.

◆ df_md_bb_local_compute()

◆ df_md_bb_local_compute_process_def()

◆ df_md_bottom_dump()

static void df_md_bottom_dump ( basic_block bb,
FILE * file )
static
Debugging info at bottom of bb.   

References df_md_get_bb_info(), df_print_regset(), ggc_alloc(), and basic_block_def::index.

◆ df_md_confluence_0()

static void df_md_confluence_0 ( basic_block bb)
static

◆ df_md_confluence_n()

static bool df_md_confluence_n ( edge e)
static

◆ df_md_free()

static void df_md_free ( void )
static
Free all storage associated with the problem.   

References bitmap_obstack_release(), bitmap_release(), df_md, df_md_scratch, free(), df_md_problem_data::md_bitmaps, and NULL.

◆ df_md_free_bb_info()

static void df_md_free_bb_info ( basic_block bb,
void * vbb_info )
static

References bitmap_clear(), and ggc_alloc().

◆ df_md_init()

static void df_md_init ( bitmap all_blocks)
static
Initialize the solution bit vectors for problem.   

References all_blocks, bitmap_copy(), df_md_get_bb_info(), df_md_transfer_function(), EXECUTE_IF_SET_IN_BITMAP, and ggc_alloc().

◆ df_md_local_compute()

◆ df_md_reset()

static void df_md_reset ( bitmap all_blocks)
static
Reset the global solution for recalculation.   

References all_blocks, bitmap_clear(), df_md_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, and ggc_alloc().

◆ df_md_simulate_artificial_defs_at_top()

void df_md_simulate_artificial_defs_at_top ( basic_block bb,
bitmap local_md )
Add the effect of the top artificial defs of BB to the multiple definitions
bitmap LOCAL_MD.   

References bitmap_clear_bit(), bitmap_set_bit, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_MAY_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, ggc_alloc(), and basic_block_def::index.

◆ df_md_simulate_one_insn()

void df_md_simulate_one_insn ( basic_block bb,
rtx_insn * insn,
bitmap local_md )
Add the effect of the defs of INSN to the reaching definitions bitmap
LOCAL_MD.   

References bitmap_clear_bit(), bitmap_set_bit, df_d::changeable_flags, df, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_MAY_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_INSN_DEF, and ggc_alloc().

◆ df_md_top_dump()

static void df_md_top_dump ( basic_block bb,
FILE * file )
static
Debugging info at top of bb.   

References df_md_get_bb_info(), df_print_regset(), ggc_alloc(), and basic_block_def::index.

◆ df_md_transfer_function()

◆ df_mir_add_problem()

void df_mir_add_problem ( void )
Create a new DATAFLOW instance and add it to an existing instance
of DF.   

References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_mir, and problem_MIR.

Referenced by find_and_remove_re().

◆ df_mir_alloc()

static void df_mir_alloc ( bitmap all_blocks)
static

◆ df_mir_bb_local_compute()

static void df_mir_bb_local_compute ( unsigned int bb_index)
static

◆ df_mir_bottom_dump()

static void df_mir_bottom_dump ( basic_block bb,
FILE * file )
static
Debugging info at bottom of bb.   

References df_mir_get_bb_info(), df_print_regset(), ggc_alloc(), and basic_block_def::index.

◆ df_mir_confluence_0()

static void df_mir_confluence_0 ( basic_block bb)
static
Initialize IN sets for blocks with no predecessors: when landing on such
blocks, assume all registers are uninitialized.   

References bitmap_clear(), df_mir_get_bb_info(), ggc_alloc(), and basic_block_def::index.

◆ df_mir_confluence_n()

static bool df_mir_confluence_n ( edge e)
static
Forward confluence function that ignores fake edges.   

References bitmap_and_into(), bitmap_copy(), df_mir_get_bb_info(), and ggc_alloc().

◆ df_mir_free()

static void df_mir_free ( void )
static
Free all storage associated with the problem.   

References bitmap_obstack_release(), df_mir, free(), df_mir_problem_data::mir_bitmaps, and NULL.

◆ df_mir_free_bb_info()

static void df_mir_free_bb_info ( basic_block bb,
void * vbb_info )
static
Free basic block info.   

References bitmap_clear(), and ggc_alloc().

◆ df_mir_init()

static void df_mir_init ( bitmap all_blocks)
static
Initialize the solution vectors.   

References all_blocks, and df_mir_reset().

◆ df_mir_local_compute()

static void df_mir_local_compute ( bitmap all_blocks)
static
Compute local uninitialized register info.   

References all_blocks, df_grow_insn_info(), df_mir_bb_local_compute(), and EXECUTE_IF_SET_IN_BITMAP.

◆ df_mir_reset()

static void df_mir_reset ( bitmap all_blocks)
static
Reset the global solution for recalculation.   

References all_blocks, bitmap_clear(), df_mir_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, and ggc_alloc().

Referenced by df_mir_init().

◆ df_mir_simulate_one_insn()

void df_mir_simulate_one_insn ( basic_block bb,
rtx_insn * insn,
bitmap kill,
bitmap gen )

◆ df_mir_top_dump()

static void df_mir_top_dump ( basic_block bb,
FILE * file )
static
Debugging info at top of bb.   

References df_mir_get_bb_info(), df_print_regset(), ggc_alloc(), and basic_block_def::index.

◆ df_mir_transfer_function()

static bool df_mir_transfer_function ( int bb_index)
static
Transfer function for the forwards must-initialized problem.   

References bitmap_ior_and_compl(), df_mir_get_bb_info(), df_mir_bb_info::gen, ggc_alloc(), df_mir_bb_info::in, kill, and df_mir_bb_info::out.

◆ df_mir_verify_solution_end()

static void df_mir_verify_solution_end ( void )
static

◆ df_mir_verify_solution_start()

static void df_mir_verify_solution_start ( void )
static

◆ df_note_add_problem()

void df_note_add_problem ( void )
Create a new DATAFLOW instance and add it to an existing instance
of DF.  The returned structure is what is used to get at the
solution.   

References df_add_problem(), and problem_NOTE.

Referenced by cse_main(), ira(), iv_analysis_loop_init(), peephole2_optimize(), regrename_optimize(), rest_of_handle_combine(), rest_of_handle_dse(), and rest_of_handle_stack_adjustments().

◆ df_note_alloc()

static void df_note_alloc ( bitmap all_blocks)
static

References df_note.

◆ df_note_bb_compute()

static void df_note_bb_compute ( unsigned int bb_index,
bitmap live,
bitmap do_not_gen,
bitmap artificial_uses )
static

◆ df_note_compute()

static void df_note_compute ( bitmap all_blocks)
static
Compute register info: lifetime, bb, and number of defs and uses.   

References all_blocks, bitmap_clear(), bitmap_initialize(), df_bitmap_obstack, df_note_bb_compute(), EXECUTE_IF_SET_IN_BITMAP, and ggc_alloc().

◆ df_note_free()

static void df_note_free ( void )
static
Free all storage associated with the problem.   

References df_note, and free().

◆ df_print_bb_index()

void df_print_bb_index ( basic_block bb,
FILE * file )
Print some basic block info as part of df_dump.   

References FOR_EACH_EDGE, ggc_alloc(), basic_block_def::index, basic_block_def::preds, and basic_block_def::succs.

Referenced by df_dump(), and dse_step4().

◆ df_print_note()

static void df_print_note ( const char * prefix,
rtx_insn * insn,
rtx note )
static

◆ df_rd_add_problem()

void df_rd_add_problem ( void )
Create a new RD instance and add it to the existing instance
of DF.   

References df_add_problem(), and problem_RD.

◆ df_rd_alloc()

◆ df_rd_bb_local_compute()

◆ df_rd_bb_local_compute_process_def()

static void df_rd_bb_local_compute_process_def ( class df_rd_bb_info * bb_info,
df_ref def,
int top_flag )
static
Process a list of DEFs for df_rd_bb_local_compute.  This is a bit
more complicated than just simulating, because we must produce the
gen and kill sets and hence deal with the two possible representations
of kill sets.    

References begin(), bitmap_bit_p, bitmap_clear_range(), bitmap_set_bit, bitmap_set_range(), df_d::changeable_flags, df, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_NO_HARD_REGS, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_NEXT_LOC, DF_REF_PARTIAL, DF_REF_REGNO, DF_SPARSE_THRESHOLD, ggc_alloc(), seen_in_block, and seen_in_insn.

Referenced by df_rd_bb_local_compute().

◆ df_rd_bottom_dump()

static void df_rd_bottom_dump ( basic_block bb,
FILE * file )
static
Debugging info at bottom of bb.   

References df_rd_dump_defs_set(), df_rd_get_bb_info(), ggc_alloc(), and basic_block_def::index.

◆ df_rd_confluence_n()

◆ df_rd_dump_defs_set()

◆ df_rd_free()

static void df_rd_free ( void )
static
Free all storage associated with the problem.   

References bitmap_obstack_release(), df_rd, free(), NULL, and df_rd_problem_data::rd_bitmaps.

◆ df_rd_free_bb_info()

static void df_rd_free_bb_info ( basic_block bb,
void * vbb_info )
static
Free basic block info.   

References bitmap_clear(), and ggc_alloc().

◆ df_rd_init_solution()

static void df_rd_init_solution ( bitmap all_blocks)
static
Initialize the solution bit vectors for problem.   

References all_blocks, bitmap_clear(), bitmap_copy(), df_rd_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, and ggc_alloc().

◆ df_rd_local_compute()

◆ df_rd_simulate_artificial_defs_at_top()

void df_rd_simulate_artificial_defs_at_top ( basic_block bb,
bitmap local_rd )
Add the effect of the top artificial defs of BB to the reaching definitions
bitmap LOCAL_RD.   

References bitmap_clear_range(), bitmap_set_bit, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, ggc_alloc(), and basic_block_def::index.

Referenced by df_chain_create_bb().

◆ df_rd_simulate_one_insn()

void df_rd_simulate_one_insn ( basic_block bb,
rtx_insn * insn,
bitmap local_rd )

◆ df_rd_start_dump()

◆ df_rd_top_dump()

static void df_rd_top_dump ( basic_block bb,
FILE * file )
static
Debugging info at top of bb.   

References df_rd_dump_defs_set(), df_rd_get_bb_info(), ggc_alloc(), and basic_block_def::index.

◆ df_rd_transfer_function()

◆ df_remove_dead_and_unused_notes()

static void df_remove_dead_and_unused_notes ( rtx_insn * insn)
static
Remove all of the REG_DEAD or REG_UNUSED notes from INSN.   

References df_ignore_stack_reg(), df_print_note(), free_EXPR_LIST_node(), ggc_alloc(), REG_DEAD_DEBUGGING, REG_NOTE_KIND, REG_NOTES, REGNO, and XEXP.

Referenced by df_note_bb_compute().

◆ df_remove_dead_eq_notes()

static void df_remove_dead_eq_notes ( rtx_insn * insn,
bitmap live )
static
Remove REG_EQUAL/REG_EQUIV notes referring to dead pseudos using LIVE
as the bitmap of currently live registers.   

References bitmap_bit_p, deleted, df_notes_rescan(), df_print_note(), DF_REF_FLAGS, DF_REF_IN_NOTE, DF_REF_LOC, DF_REF_REGNO, FOR_EACH_INSN_EQ_USE, free_EXPR_LIST_node(), ggc_alloc(), loc_mentioned_in_p(), REG_DEAD_DEBUGGING, REG_NOTE_KIND, REG_NOTES, df_word_lr_bb_info::use, and XEXP.

Referenced by df_note_bb_compute().

◆ df_set_dead_notes_for_mw()

static void df_set_dead_notes_for_mw ( rtx_insn * insn,
struct df_mw_hardreg * mws,
bitmap live,
bitmap do_not_gen,
bitmap artificial_uses,
bool * added_notes_p )
static
Set the REG_DEAD notes for the multiword hardreg use in INSN based
on the bits in LIVE.  DO_NOT_GEN is used to keep REG_DEAD notes
from being set if the instruction both reads and writes the
register.   

References bitmap_bit_p, df_print_note(), df_print_regset(), df_set_note(), df_whole_mw_reg_dead_p(), dump_file, ggc_alloc(), r, REG_DEAD_DEBUGGING, REG_NOTES, and regno_reg_rtx.

Referenced by df_note_bb_compute().

◆ df_set_note()

static void df_set_note ( enum reg_note note_type,
rtx_insn * insn,
rtx reg )
inlinestatic

◆ df_set_unused_notes_for_mw()

static void df_set_unused_notes_for_mw ( rtx_insn * insn,
struct df_mw_hardreg * mws,
bitmap live,
bitmap do_not_gen,
bitmap artificial_uses,
struct dead_debug_local * debug )
static
Set the REG_UNUSED notes for the multiword hardreg defs in INSN
  based on the bits in LIVE.  Do not generate notes for registers in
  artificial uses.  DO_NOT_GEN is updated so that REG_DEAD notes are
  not generated if the reg is both read and written by the
  instruction.

References bitmap_bit_p, bitmap_set_bit, dead_debug_insert_temp(), debug, DEBUG_TEMP_AFTER_WITH_REG, df_print_note(), df_set_note(), df_whole_mw_reg_unused_p(), dump_file, ggc_alloc(), r, REG_DEAD_DEBUGGING, REG_NOTES, and regno_reg_rtx.

Referenced by df_note_bb_compute().

◆ df_simulate_defs()

void df_simulate_defs ( rtx_insn * insn,
bitmap live )

◆ df_simulate_finalize_backwards()

void df_simulate_finalize_backwards ( basic_block bb,
bitmap live )
Apply the artificial uses and defs at the top of BB in a backwards
direction.   

References bitmap_clear_bit(), bitmap_set_bit, DF_REF_AT_TOP, DF_REF_FLAGS, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, and basic_block_def::index.

Referenced by dce_process_block().

◆ df_simulate_find_defs()

void df_simulate_find_defs ( rtx_insn * insn,
bitmap defs )
Find the set of DEFs for INSN.   

References bitmap_set_bit, defs, DF_REF_REGNO, and FOR_EACH_INSN_DEF.

Referenced by can_move_insns_across(), and dead_or_predicable().

◆ df_simulate_find_noclobber_defs()

void df_simulate_find_noclobber_defs ( rtx_insn * insn,
bitmap defs )
Find the set of real DEFs, which are not clobbers, for INSN.   

References bitmap_set_bit, defs, DF_REF_FLAGS, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_REGNO, FOR_EACH_INSN_DEF, and df_insn_info::insn.

Referenced by df_simulate_one_insn_forwards().

◆ df_simulate_find_uses()

static void df_simulate_find_uses ( rtx_insn * insn,
bitmap uses )
static

◆ df_simulate_fixup_sets()

static void df_simulate_fixup_sets ( basic_block bb,
bitmap live )
inlinestatic

◆ df_simulate_initialize_backwards()

void df_simulate_initialize_backwards ( basic_block bb,
bitmap live )

◆ df_simulate_initialize_forwards()

void df_simulate_initialize_forwards ( basic_block bb,
bitmap live )
Initialize the LIVE bitmap, which should be copied from DF_LIVE_IN or
DF_LR_IN for basic block BB, for forward scanning by marking artificial
defs live.   

References bitmap_set_bit, DF_REF_AT_TOP, DF_REF_FLAGS, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, and basic_block_def::index.

Referenced by combine_stack_adjustments_for_block(), dse_step1(), and peephole2_optimize().

◆ df_simulate_one_insn_backwards()

void df_simulate_one_insn_backwards ( basic_block bb,
rtx_insn * insn,
bitmap live )

◆ df_simulate_one_insn_forwards()

void df_simulate_one_insn_forwards ( basic_block bb,
rtx_insn * insn,
bitmap live )

◆ df_simulate_uses()

void df_simulate_uses ( rtx_insn * insn,
bitmap live )

◆ df_whole_mw_reg_dead_p()

static bool df_whole_mw_reg_dead_p ( struct df_mw_hardreg * mws,
bitmap live,
bitmap artificial_uses,
bitmap do_not_gen )
static
A subroutine of df_set_dead_notes_for_mw, with a selection of its
arguments.  Return true if the register value described by MWS's
mw_reg is known to be completely dead, and if mw_reg can therefore
be used in a REG_DEAD note.   

References bitmap_bit_p, DF_REF_PARTIAL, gcc_assert, ggc_alloc(), r, and REG_P.

Referenced by df_set_dead_notes_for_mw().

◆ df_whole_mw_reg_unused_p()

static bool df_whole_mw_reg_unused_p ( struct df_mw_hardreg * mws,
bitmap live,
bitmap artificial_uses )
static
A subroutine of df_set_unused_notes_for_mw, with a selection of its
arguments.  Return true if the register value described by MWS's
mw_reg is known to be completely unused, and if mw_reg can therefore
be used in a REG_UNUSED note.   

References bitmap_bit_p, DF_REF_PARTIAL, gcc_assert, ggc_alloc(), r, and REG_P.

Referenced by df_set_unused_notes_for_mw().

◆ df_word_lr_add_problem()

void df_word_lr_add_problem ( void )
Create a new DATAFLOW instance and add it to an existing instance
of DF.  The returned structure is what is used to get at the
solution.   

References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_word_lr, and problem_WORD_LR.

Referenced by run_word_dce().

◆ df_word_lr_alloc()

static void df_word_lr_alloc ( bitmap all_blocks)
static

◆ df_word_lr_bb_local_compute()

◆ df_word_lr_bottom_dump()

static void df_word_lr_bottom_dump ( basic_block bb,
FILE * file )
static
Debugging info at bottom of bb.   

References df_print_word_regset(), df_word_lr_get_bb_info(), ggc_alloc(), and basic_block_def::index.

◆ df_word_lr_confluence_n()

static bool df_word_lr_confluence_n ( edge e)
static
Confluence function that ignores fake edges.   

References bitmap_ior_into(), df_word_lr_get_bb_info(), df_word_lr_bb_info::in, and df_word_lr_bb_info::out.

◆ df_word_lr_free()

static void df_word_lr_free ( void )
static
Free all storage associated with the problem.   

References BITMAP_FREE, bitmap_obstack_release(), df_word_lr, free(), NULL, and df_word_lr_problem_data::word_lr_bitmaps.

◆ df_word_lr_free_bb_info()

static void df_word_lr_free_bb_info ( basic_block bb,
void * vbb_info )
static
Free basic block info.   

References bitmap_clear(), and ggc_alloc().

◆ df_word_lr_init()

static void df_word_lr_init ( bitmap all_blocks)
static

◆ df_word_lr_local_compute()

static void df_word_lr_local_compute ( bitmap all_blocks)
static
Compute local live register info for each basic block within BLOCKS.   

References bitmap_clear(), df, df_word_lr, df_word_lr_bb_local_compute(), EXECUTE_IF_SET_IN_BITMAP, EXIT_BLOCK, df_d::exit_block_uses, gcc_unreachable, and ggc_alloc().

◆ df_word_lr_mark_ref()

bool df_word_lr_mark_ref ( df_ref ref,
bool is_set,
regset live )
Examine REF, and if it is for a reg we're interested in, set or
clear the bits corresponding to its subwords from the bitmap
according to IS_SET.  LIVE is the bitmap we should update.  We do
not track hard regs or pseudos of any size other than 2 *
UNITS_PER_WORD.
We return true if we changed the bitmap, or if we encountered a register
we're not tracking.   

References bitmap_clear_bit(), bitmap_set_bit, changed, DF_REF_FLAGS_IS_SET, DF_REF_PARTIAL, DF_REF_REG, gcc_assert, GET_CODE, GET_MODE, GET_MODE_SIZE(), ggc_alloc(), read_modify_subreg_p(), reg_mode, REGNO, subreg_lowpart_p(), and SUBREG_REG.

Referenced by df_word_lr_bb_local_compute(), df_word_lr_simulate_defs(), and df_word_lr_simulate_uses().

◆ df_word_lr_reset()

static void df_word_lr_reset ( bitmap all_blocks)
static
Reset the global solution for recalculation.   

References all_blocks, bitmap_clear(), df_word_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, and ggc_alloc().

◆ df_word_lr_simulate_defs()

bool df_word_lr_simulate_defs ( rtx_insn * insn,
bitmap live )
Simulate the effects of the defs of INSN on LIVE.  Return true if we changed
any bits, which is used by the caller to determine whether a set is
necessary.  We also return true if there are other reasons not to delete
an insn.   

References changed, df_word_lr_bb_info::def, DF_REF_CONDITIONAL, DF_REF_FLAGS, df_word_lr_mark_ref(), and FOR_EACH_INSN_DEF.

Referenced by word_dce_process_block().

◆ df_word_lr_simulate_uses()

void df_word_lr_simulate_uses ( rtx_insn * insn,
bitmap live )
Simulate the effects of the uses of INSN on LIVE.   

References df_word_lr_mark_ref(), FOR_EACH_INSN_USE, and df_word_lr_bb_info::use.

Referenced by word_dce_process_block().

◆ df_word_lr_top_dump()

static void df_word_lr_top_dump ( basic_block bb,
FILE * file )
static
Debugging info at top of bb.   

References df_print_word_regset(), df_word_lr_get_bb_info(), ggc_alloc(), and basic_block_def::index.

◆ df_word_lr_transfer_function()

static bool df_word_lr_transfer_function ( int bb_index)
static

◆ find_memory()

static int find_memory ( rtx_insn * insn)
static
Return an OR of MEMREF_NORMAL or MEMREF_VOLATILE for the MEMs in X.   

References FOR_EACH_SUBRTX, GET_CODE, ggc_alloc(), df_insn_info::insn, MEM_P, MEM_READONLY_P, MEM_VOLATILE_P, MEMREF_NORMAL, MEMREF_VOLATILE, and PATTERN().

Referenced by can_move_insns_across().

◆ find_memory_stores()

static void find_memory_stores ( rtx x,
const_rtx pat,
void * data )
static
A subroutine of can_move_insns_across_p called through note_stores.
DATA points to an integer in which we set either the bit for
MEMREF_NORMAL or the bit for MEMREF_VOLATILE if we find a MEM
of either kind.   

References GET_CODE, ggc_alloc(), MEM_P, MEM_VOLATILE_P, MEMREF_NORMAL, MEMREF_VOLATILE, pflags, stack_pointer_rtx, and XEXP.

Referenced by can_move_insns_across().

◆ simulate_backwards_to_point()

void simulate_backwards_to_point ( basic_block bb,
regset live,
rtx point )
Scan BB backwards, using df_simulate functions to keep track of
lifetimes, up to insn POINT.  The result is stored in LIVE.   

References BB_END, bitmap_copy(), df_get_live_out(), df_simulate_initialize_backwards(), df_simulate_one_insn_backwards(), ggc_alloc(), df_insn_info::insn, and PREV_INSN().

Referenced by dead_or_predicable(), and try_head_merge_bb().

Variable Documentation

◆ df_live_scratch

bitmap_head df_live_scratch
static
Scratch var used by transfer functions.  This is used to implement
an optimization to reduce the amount of space used to compute the
combined lr and live analysis.   

Referenced by df_live_alloc(), df_live_free(), and df_live_transfer_function().

◆ df_md_scratch

bitmap_head df_md_scratch
static
Scratch var used by transfer functions.  This is used to do md analysis
only for live registers.   

Referenced by df_md_alloc(), df_md_free(), and df_md_transfer_function().

◆ problem_CHAIN

const struct df_problem problem_CHAIN
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (struct df_scan_bb_info),
}
static void df_chain_alloc(bitmap all_blocks)
Definition df-problems.cc:2453
static void df_chain_fully_remove_problem(void)
Definition df-problems.cc:2442
static void df_chain_insn_top_dump(const rtx_insn *insn, FILE *file)
Definition df-problems.cc:2652
static void df_chain_bottom_dump(basic_block bb, FILE *file)
Definition df-problems.cc:2646
static const struct df_problem problem_RD
Definition df-problems.cc:672
static void df_chain_top_dump(basic_block bb, FILE *file)
Definition df-problems.cc:2640
static void df_chain_finalize(bitmap all_blocks)
Definition df-problems.cc:2574
static void df_chain_insn_bottom_dump(const rtx_insn *insn, FILE *file)
Definition df-problems.cc:2683
static void df_chain_reset(bitmap blocks_to_clear)
Definition df-problems.cc:2464
static void df_chain_free(void)
Definition df-problems.cc:2589
@ DF_CHAIN
Definition df.h:52
@ DF_NONE
Definition df.h:64
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
Definition df.h:810
#define NULL
Definition system.h:50
#define false
Definition system.h:895

Referenced by df_chain_add_problem().

◆ problem_LIVE

const struct df_problem problem_LIVE
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
sizeof (class df_live_bb_info),
}
Definition df.h:887
void df_worklist_dataflow(struct dataflow *dataflow, bitmap blocks_to_consider, int *blocks_in_postorder, int n_blocks)
Definition df-core.cc:1088
static void df_live_verify_solution_start(void)
Definition df-problems.cc:1704
static void df_live_local_compute(bitmap all_blocks)
Definition df-problems.cc:1521
static void df_live_free_bb_info(basic_block bb, void *vbb_info)
Definition df-problems.cc:1387
static void df_live_bottom_dump(basic_block bb, FILE *file)
Definition df-problems.cc:1678
static void df_live_alloc(bitmap all_blocks)
Definition df-problems.cc:1405
static const struct df_problem problem_LR
Definition df-problems.cc:1240
static void df_live_verify_solution_end(void)
Definition df-problems.cc:1732
static void df_live_reset(bitmap all_blocks)
Definition df-problems.cc:1451
static void df_live_free(void)
Definition df-problems.cc:1627
static void df_live_init(bitmap all_blocks)
Definition df-problems.cc:1541
static bool df_live_confluence_n(edge e)
Definition df-problems.cc:1561
static void df_live_finalize(bitmap all_blocks)
Definition df-problems.cc:1600
static bool df_live_transfer_function(int bb_index)
Definition df-problems.cc:1576
static void df_live_top_dump(basic_block bb, FILE *file)
Definition df-problems.cc:1649
@ DF_LIVE
Definition df.h:50
@ DF_FORWARD
Definition df.h:65
All of the information associated with every instance of the problem.   

Referenced by df_live_add_problem().

◆ problem_LR

const struct df_problem problem_LR
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (class df_lr_bb_info),
}
Definition df.h:869
static void df_lr_verify_solution_end(void)
Definition df-problems.cc:1198
static void df_lr_free(void)
Definition df-problems.cc:1094
static void df_lr_verify_solution_start(void)
Definition df-problems.cc:1170
static void df_lr_alloc(bitmap all_blocks)
Definition df-problems.cc:753
static void df_lr_top_dump(basic_block bb, FILE *file)
Definition df-problems.cc:1117
static bool df_lr_transfer_function(int bb_index)
Definition df-problems.cc:1045
static void df_lr_reset(bitmap all_blocks)
Definition df-problems.cc:798
static void df_lr_confluence_0(basic_block bb)
Definition df-problems.cc:1006
static void df_lr_free_bb_info(basic_block bb, void *vbb_info)
Definition df-problems.cc:735
static void df_lr_finalize(bitmap all_blocks)
Definition df-problems.cc:1060
static void df_lr_init(bitmap all_blocks)
Definition df-problems.cc:988
static void df_lr_bottom_dump(basic_block bb, FILE *file)
Definition df-problems.cc:1145
static bool df_lr_confluence_n(edge e)
Definition df-problems.cc:1017
static void df_lr_local_compute(bitmap all_blocks)
Definition df-problems.cc:930
@ DF_LR
Definition df.h:49
@ DF_BACKWARD
Definition df.h:66
All of the information associated with every instance of the problem.   

Referenced by df_lr_add_problem().

◆ problem_MD

const struct df_problem problem_MD
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (class df_md_bb_info),
}
Definition df.h:852
static void df_md_free_bb_info(basic_block bb, void *vbb_info)
Definition df-problems.cc:4406
static void df_md_local_compute(bitmap all_blocks)
Definition df-problems.cc:4581
static void df_md_top_dump(basic_block bb, FILE *file)
Definition df-problems.cc:4731
static void df_md_alloc(bitmap all_blocks)
Definition df-problems.cc:4425
static void df_md_confluence_0(basic_block bb)
Definition df-problems.cc:4679
static void df_md_reset(bitmap all_blocks)
Definition df-problems.cc:4625
static void df_md_bottom_dump(basic_block bb, FILE *file)
Definition df-problems.cc:4750
static bool df_md_confluence_n(edge e)
Definition df-problems.cc:4688
static bool df_md_transfer_function(int bb_index)
Definition df-problems.cc:4640
static void df_md_free(void)
Definition df-problems.cc:4711
static void df_md_init(bitmap all_blocks)
Definition df-problems.cc:4664
@ DF_MD
Definition df.h:55

Referenced by df_md_add_problem().

◆ problem_MIR

const struct df_problem problem_MIR
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (class df_mir_bb_info),
}
Definition df.h:921
static void df_mir_alloc(bitmap all_blocks)
Definition df-problems.cc:1924
static void df_mir_init(bitmap all_blocks)
Definition df-problems.cc:2047
static void df_mir_free(void)
Definition df-problems.cc:2116
static void df_mir_bottom_dump(basic_block bb, FILE *file)
Definition df-problems.cc:2154
static void df_mir_verify_solution_start(void)
Definition df-problems.cc:2170
static void df_mir_verify_solution_end(void)
Definition df-problems.cc:2199
static void df_mir_reset(bitmap all_blocks)
Definition df-problems.cc:1971
static void df_mir_free_bb_info(basic_block bb, void *vbb_info)
Definition df-problems.cc:1906
static bool df_mir_transfer_function(int bb_index)
Definition df-problems.cc:2101
static void df_mir_local_compute(bitmap all_blocks)
Definition df-problems.cc:2030
static bool df_mir_confluence_n(edge e)
Definition df-problems.cc:2069
static void df_mir_confluence_0(basic_block bb)
Definition df-problems.cc:2057
static void df_mir_top_dump(basic_block bb, FILE *file)
Definition df-problems.cc:2136
@ DF_MIR
Definition df.h:56
All of the information associated with every instance of the problem.   

Referenced by df_mir_add_problem().

◆ problem_NOTE

const struct df_problem problem_NOTE
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (struct df_scan_bb_info),
}
static void df_note_alloc(bitmap all_blocks)
Definition df-problems.cc:3152
static void df_note_free(void)
Definition df-problems.cc:3739
static void df_note_compute(bitmap all_blocks)
Definition df-problems.cc:3710
@ DF_NOTE
Definition df.h:54
All of the information associated every instance of the problem.   

Referenced by df_note_add_problem().

◆ problem_RD

const struct df_problem problem_RD
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (class df_rd_bb_info),
}
Definition df.h:835
static bool df_rd_transfer_function(int bb_index)
Definition df-problems.cc:487
static void df_rd_free(void)
Definition df-problems.cc:552
static void df_rd_init_solution(bitmap all_blocks)
Definition df-problems.cc:432
static void df_rd_free_bb_info(basic_block bb, void *vbb_info)
Definition df-problems.cc:163
static void df_rd_bottom_dump(basic_block bb, FILE *file)
Definition df-problems.cc:661
static void df_rd_start_dump(FILE *file)
Definition df-problems.cc:573
static void df_rd_alloc(bitmap all_blocks)
Definition df-problems.cc:182
static void df_rd_local_compute(bitmap all_blocks)
Definition df-problems.cc:389
static bool df_rd_confluence_n(edge e)
Definition df-problems.cc:449
static void df_rd_top_dump(basic_block bb, FILE *file)
Definition df-problems.cc:646
@ DF_RD
Definition df.h:51
#define true
Definition system.h:894
All of the information associated with every instance of the problem.   

Referenced by df_rd_add_problem().

◆ problem_WORD_LR

const struct df_problem problem_WORD_LR
static
Initial value:
=
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (class df_word_lr_bb_info),
}
Definition df.h:906
static bool df_word_lr_confluence_n(edge e)
Definition df-problems.cc:2992
static void df_word_lr_local_compute(bitmap all_blocks)
Definition df-problems.cc:2949
static void df_word_lr_reset(bitmap all_blocks)
Definition df-problems.cc:2842
static void df_word_lr_free(void)
Definition df-problems.cc:3019
static bool df_word_lr_transfer_function(int bb_index)
Definition df-problems.cc:3004
static void df_word_lr_free_bb_info(basic_block bb, void *vbb_info)
Definition df-problems.cc:2772
static void df_word_lr_init(bitmap all_blocks)
Definition df-problems.cc:2975
static void df_word_lr_alloc(bitmap all_blocks)
Definition df-problems.cc:2790
static void df_word_lr_bottom_dump(basic_block bb, FILE *file)
Definition df-problems.cc:3059
static void df_word_lr_top_dump(basic_block bb, FILE *file)
Definition df-problems.cc:3041
@ DF_WORD_LR
Definition df.h:53
All of the information associated with every instance of the problem.   

Referenced by df_word_lr_add_problem().

◆ seen_in_block

◆ seen_in_insn