GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | cselib_val_struct |
struct | elt_loc_list |
struct | cselib_set |
Typedefs | |
typedef struct cselib_val_struct | cselib_val |
typedef rtx(* | cselib_expand_callback )(rtx, bitmap, int, void *) |
Enumerations | |
enum | cselib_record_what { CSELIB_RECORD_MEMORY = 1, CSELIB_PRESERVE_CONSTANTS = 2 } |
Variables | |
void(* | cselib_discard_hook )(cselib_val *) |
void(* | cselib_record_sets_hook )(rtx insn, struct cselib_set *sets, int n_sets) |
typedef struct cselib_val_struct cselib_val |
@verbatim Common subexpression elimination for GNU compiler.
Copyright (C) 1987-2013 Free Software Foundation, Inc.
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/.
Describe a value.
enum cselib_record_what |
|
inlinestatic |
Return the canonical value for VAL, following the equivalence chain towards the earliest (== lowest uid) equivalent value.
References elt_loc_list::loc, cselib_val_struct::locs, elt_loc_list::next, and cselib_val_struct::uid.
Referenced by add_mem_for_addr(), cselib_invalidate_mem(), cselib_invalidate_regno(), cselib_lookup_mem(), get_addr(), memrefs_conflict_p(), new_elt_loc_list(), remove_useless_values(), reverse_op(), rtx_equal_for_cselib_1(), and val_bind().
void cselib_add_permanent_equiv | ( | cselib_val * | , |
rtx | , | ||
rtx | |||
) |
void cselib_clear_table | ( | void | ) |
Remove all entries from the hash table. Also used during initialization.
References cselib_reset_table().
Referenced by cselib_finish(), dse_step1(), and local_cprop_pass().
bool cselib_dummy_expand_value_rtx_cb | ( | rtx | orig, |
bitmap | regs_active, | ||
int | max_depth, | ||
cselib_expand_callback | cb, | ||
void * | data | ||
) |
Similar to cselib_expand_value_rtx_cb, but no rtxs are actually copied or simplified. Useful to find out whether cselib_expand_value_rtx_cb would return NULL or non-NULL, without allocating new rtx.
References expand_value_data::callback, expand_value_data::callback_arg, cselib_expand_value_rtx_1(), expand_value_data::dummy, and expand_value_data::regs_active.
rtx cselib_expand_value_rtx_cb | ( | rtx | orig, |
bitmap | regs_active, | ||
int | max_depth, | ||
cselib_expand_callback | cb, | ||
void * | data | ||
) |
Same as cselib_expand_value_rtx, but using a callback to try to resolve some expressions. The CB function should return ORIG if it can't or does not want to deal with a certain RTX. Any other return value, including NULL, will be used as the expansion for VALUE, without any further changes.
References expand_value_data::callback, expand_value_data::callback_arg, cselib_expand_value_rtx_1(), expand_value_data::dummy, and expand_value_data::regs_active.
Referenced by vt_expand_loc(), vt_expand_loc_callback(), and vt_expand_var_loc_chain().
void cselib_finish | ( | void | ) |
Called when the current user is done with cselib.
References cfa_base_preserved_regno, cselib_any_perm_equivs, cselib_clear_table(), cselib_discard_hook, cselib_preserve_constants, hash_table< Descriptor, Allocator >::dispose(), free(), free_alloc_pool(), n_debug_values, n_useless_debug_values, n_useless_values, next_uid, and used_regs.
Referenced by dse_step1(), local_cprop_pass(), reload_cse_regs_1(), sched_analyze(), thread_jump(), and vt_finalize().
unsigned int cselib_get_next_uid | ( | void | ) |
Return the number of the next value that will be generated.
References next_uid.
Referenced by vt_emit_notes(), and vt_initialize().
bool cselib_have_permanent_equivalences | ( | void | ) |
Return TRUE if any permanent equivalences have been recorded since the table was last initialized.
References cselib_any_perm_equivs.
Referenced by get_addr().
void cselib_init | ( | int | ) |
void cselib_invalidate_rtx | ( | rtx | ) |
cselib_val* cselib_lookup | ( | rtx | x, |
enum machine_mode | mode, | ||
int | create, | ||
enum machine_mode | memmode | ||
) |
Wrapper for cselib_lookup_1, that logs the lookup result and maintains invariants related with debug insns.
References cselib_lookup_1(), dump_file, dump_flags, cselib_val_struct::hash, print_inline_rtx(), and cselib_val_struct::uid.
Referenced by add_stores(), add_uses(), canon_address(), cselib_add_permanent_equiv(), cselib_hash_rtx(), cselib_invalidate_mem(), cselib_lookup_from_insn(), cselib_lookup_mem(), cselib_record_sets(), cselib_subst_to_values(), debug_mem_addr_value(), do_local_cprop(), find_use_val(), prepare_call_arguments(), reload_cse_simplify_operands(), reload_cse_simplify_set(), replace_expr_with_values(), reverse_op(), rtx_equal_for_cselib_1(), use_narrower_mode_test(), use_type(), variable_post_merge_new_vals(), and vt_initialize().
cselib_val* cselib_lookup_from_insn | ( | rtx | x, |
enum machine_mode | mode, | ||
int | create, | ||
enum machine_mode | memmode, | ||
rtx | insn | ||
) |
Wrapper for cselib_lookup, that indicates X is in INSN.
References cselib_current_insn, and cselib_lookup().
Referenced by sched_analyze_1(), sched_analyze_2(), vt_add_function_parameter(), vt_init_cfa_base(), and vt_initialize().
void cselib_preserve_cfa_base_value | ( | cselib_val * | , |
unsigned | int | ||
) |
void cselib_preserve_only_values | ( | void | ) |
Clean all non-constant expressions in the hash table, but retain their values.
References cselib_invalidate_mem(), cselib_invalidate_regno(), first_containing_mem, and remove_useless_values().
Referenced by cselib_process_insn(), and vt_initialize().
void cselib_preserve_value | ( | cselib_val * | ) |
bool cselib_preserved_value_p | ( | cselib_val * | ) |
void cselib_process_insn | ( | rtx | ) |
enum machine_mode cselib_reg_set_mode | ( | const_rtx | ) |
void cselib_reset_table | ( | unsigned | int | ) |
void cselib_set_value_sp_based | ( | cselib_val * | ) |
bool cselib_sp_based_value_p | ( | cselib_val * | ) |
void dump_cselib_table | ( | FILE * | ) |
bool fp_setter_insn | ( | rtx | ) |
int references_value_p | ( | const_rtx | , |
int | |||
) |
void(* cselib_discard_hook)(cselib_val *) |
If nonnull, cselib will call this function before freeing useless VALUEs. A VALUE is deemed useless if its "locs" field is null.
Referenced by cselib_finish(), discard_useless_values(), and dse_step1().
void(* cselib_record_sets_hook)(rtx insn, struct cselib_set *sets, int n_sets) |
If nonnull, cselib will call this function before recording sets or even clobbering outputs of INSN. All the recorded sets will be represented in the array sets[n_sets]. new_val_min can be used to tell whether values present in sets are introduced by this instruction.
Referenced by cselib_record_sets(), and vt_initialize().