GCC Middle and Back End API Reference
|
Data Structures | |
struct | rtx_subst_pair |
Functions | |
static rtx | gen_lowpart_for_debug () |
static rtx | cleanup_auto_inc_dec () |
static rtx | propagate_for_debug_subst () |
void | propagate_for_debug (rtx insn, rtx last, rtx dest, rtx src, basic_block this_basic_block) |
void | dead_debug_global_init () |
void | dead_debug_local_init (struct dead_debug_local *debug, bitmap used, struct dead_debug_global *global) |
static dead_debug_global_entry * | dead_debug_global_find () |
static dead_debug_global_entry * | dead_debug_global_insert () |
static bool | dead_debug_global_replace_temp (struct dead_debug_global *global, df_ref use, unsigned int uregno, bitmap *pto_rescan) |
static void | dead_debug_reset_uses (struct dead_debug_local *debug, struct dead_debug_use *head) |
static void | dead_debug_promote_uses () |
void | dead_debug_local_finish () |
void | dead_debug_global_finish () |
void | dead_debug_add () |
int | dead_debug_insert_temp (struct dead_debug_local *debug, unsigned int uregno, rtx insn, enum debug_temp_where where) |
|
static |
Replace auto-increment addressing modes with explicit operations to access the same addresses without modifying the corresponding registers.
References copy_rtx(), rtvec_alloc(), and shared_const_p().
Referenced by dead_debug_insert_temp(), and propagate_for_debug_subst().
void dead_debug_add | ( | ) |
Add USE to DEBUG, or substitute it right away if it's a pseudo in the global substitution list. USE must be a dead reference to UREGNO in a debug insn. Create a bitmap for DEBUG as needed.
References bitmap_set_bit(), dead_debug_global_replace_temp(), dead_debug_local::global, dead_debug_local::head, dead_debug_use::next, dead_debug_local::to_rescan, dead_debug_use::use, and dead_debug_local::used.
Referenced by dce_process_block(), df_note_bb_compute(), and word_dce_process_block().
|
static |
Locate the entry for REG in GLOBAL->htab.
References hash_table< Descriptor, Allocator >::find(), dead_debug_global::htab, and dead_debug_global_entry::reg.
Referenced by dead_debug_global_replace_temp(), and dead_debug_insert_temp().
void dead_debug_global_finish | ( | ) |
Release GLOBAL->used unless it is the same as USED. Release the mapping hash table if it was initialized.
References hash_table< Descriptor, Allocator >::dispose(), dead_debug_global::htab, hash_table< Descriptor, Allocator >::is_created(), and dead_debug_global::used.
Referenced by fast_dce().
void dead_debug_global_init | ( | ) |
Initialize DEBUG to an empty list, and clear USED, if given.
References bitmap_clear(), and dead_debug_global::used.
Referenced by fast_dce().
|
static |
Insert an entry mapping REG to DTEMP in GLOBAL->htab.
References hash_table< Descriptor, Allocator >::create(), dead_debug_global_entry::dtemp, hash_table< Descriptor, Allocator >::find_slot(), dead_debug_global::htab, hash_table< Descriptor, Allocator >::is_created(), and dead_debug_global_entry::reg.
Referenced by dead_debug_promote_uses().
|
static |
If UREGNO, referenced by USE, is a pseudo marked as used in GLOBAL, replace it with with a USE of the debug temp recorded for it, and return TRUE. Otherwise, just return FALSE. If PTO_RESCAN is given, instead of rescanning modified INSNs right away, add their UIDs to the bitmap, allocating one of *PTO_RESCAN is NULL.
References bitmap_bit_p(), bitmap_set_bit(), dead_debug_global_find(), df_insn_rescan(), dead_debug_global_entry::dtemp, dead_debug_global_entry::reg, and dead_debug_global::used.
Referenced by dead_debug_add(), and dead_debug_promote_uses().
int dead_debug_insert_temp | ( | struct dead_debug_local * | debug, |
unsigned int | uregno, | ||
rtx | insn, | ||
enum debug_temp_where | where | ||
) |
If UREGNO is referenced by any entry in DEBUG, emit a debug insn before or after INSN (depending on WHERE), that binds a (possibly global) debug temp to the widest-mode use of UREGNO, if WHERE is *_WITH_REG, or the value stored in UREGNO by INSN otherwise, and replace all uses of UREGNO in DEBUG with uses of the debug temp. INSN must be where UREGNO dies, if WHERE is *_BEFORE_*, or where it is set otherwise. Return the number of debug insns emitted.
References bitmap_bit_p(), bitmap_clear_bit(), bitmap_set_bit(), cleanup_auto_inc_dec(), dead_debug_global_find(), dead_debug_reset_uses(), DEBUG_TEMP_AFTER_WITH_REG, DEBUG_TEMP_AFTER_WITH_REG_FORCE, DEBUG_TEMP_BEFORE_WITH_VALUE, dead_debug_global_entry::dtemp, emit_debug_insn_after(), emit_debug_insn_before(), gen_lowpart_SUBREG(), dead_debug_local::global, dead_debug_local::head, lowpart_subreg(), make_debug_expr_from_rtl(), dead_debug_use::next, dead_debug_global_entry::reg, regno_reg_rtx, subreg_lowpart_p(), dead_debug_local::to_rescan, dead_debug_use::use, dead_debug_global::used, dead_debug_local::used, and VAR_INIT_STATUS_INITIALIZED.
Referenced by dce_process_block(), dead_debug_promote_uses(), df_create_unused_note(), df_note_bb_compute(), df_set_unused_notes_for_mw(), and word_dce_process_block().
void dead_debug_local_finish | ( | ) |
Reset all debug insns with pending uses. Release the bitmap in it, unless it is USED. USED must be the same bitmap passed to dead_debug_local_init.
References dead_debug_promote_uses(), dead_debug_reset_uses(), df_insn_rescan(), dead_debug_local::global, dead_debug_local::head, df_insn_info::insn, dead_debug_local::to_rescan, and dead_debug_local::used.
Referenced by dce_process_block(), df_note_bb_compute(), and word_dce_process_block().
void dead_debug_local_init | ( | struct dead_debug_local * | debug, |
bitmap | used, | ||
struct dead_debug_global * | global | ||
) |
Initialize DEBUG to an empty list, and clear USED, if given. Link back to GLOBAL, if given, and bring in used bits from it.
References bitmap_clear(), bitmap_copy(), dead_debug_local::global, dead_debug_local::head, dead_debug_local::to_rescan, dead_debug_global::used, and dead_debug_local::used.
Referenced by dce_process_block(), df_note_bb_compute(), and word_dce_process_block().
|
static |
Promote pending local uses of pseudos in DEBUG to global substitutions. Uses of non-pseudos are left alone for resetting.
References bitmap_set_bit(), dead_debug_global_insert(), dead_debug_global_replace_temp(), dead_debug_insert_temp(), DEBUG_TEMP_BEFORE_WITH_VALUE, dead_debug_global_entry::dtemp, emit_debug_insn_before(), dead_debug_local::global, dead_debug_local::head, df_insn_info::insn, make_debug_expr_from_rtl(), dead_debug_local::to_rescan, dead_debug_global::used, and VAR_INIT_STATUS_INITIALIZED.
Referenced by dead_debug_local_finish().
|
static |
Reset all debug uses in HEAD, and clear DEBUG->to_rescan bits of each reset insn. DEBUG is not otherwise modified. If HEAD is DEBUG->head, DEBUG->head will be set to NULL at the end. Otherwise, entries from DEBUG->head that pertain to reset insns will be removed, and only then rescanned.
References bitmap_bit_p(), bitmap_clear_bit(), bitmap_set_bit(), df_insn_rescan_debug_internal(), dead_debug_local::head, df_insn_info::insn, dead_debug_use::next, dead_debug_local::to_rescan, and dead_debug_use::use.
Referenced by dead_debug_insert_temp(), and dead_debug_local_finish().
|
static |
@verbatim Infrastructure for tracking user variable locations and values
throughout compilation. Copyright (C) 2010-2013 Free Software Foundation, Inc. Contributed by Alexandre Oliva aoliv. a@re dhat. 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/.
gen_lowpart_no_emit hook implementation for DEBUG_INSNs. In DEBUG_INSNs, all lowpart SUBREGs are valid, despite what the machine requires for instructions.
References gen_lowpart_if_possible(), and subreg_lowpart_offset().
Referenced by propagate_for_debug().
void propagate_for_debug | ( | rtx | insn, |
rtx | last, | ||
rtx | dest, | ||
rtx | src, | ||
basic_block | this_basic_block | ||
) |
Replace all the occurrences of DEST with SRC in DEBUG_INSNs between INSN and LAST, not including INSN, but including LAST. Also stop at the end of THIS_BASIC_BLOCK.
References rtx_subst_pair::adjusted, df_insn_rescan(), gen_lowpart_for_debug(), rtl_hooks::gen_lowpart_no_emit, propagate_for_debug_subst(), simplify_replace_fn_rtx(), and rtx_subst_pair::to.
Referenced by try_combine().
|
static |
DATA points to an rtx_subst_pair. Return the value that should be substituted.
References rtx_subst_pair::adjusted, cleanup_auto_inc_dec(), copy_rtx(), make_compound_operation(), rtx_equal_p(), SET, and rtx_subst_pair::to.
Referenced by propagate_for_debug().