GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | operand_alternative |
class | insn_propagation |
class | undo_recog_changes |
class | temporary_volatile_ok |
struct | recog_data_d |
class | recog_data_saver |
struct | insn_gen_fn |
struct | insn_operand_data |
struct | insn_data_d |
struct | target_recog |
class | insn_change_watermark |
Macros | |
#define | MAX_RECOG_ALTERNATIVES 35 |
#define | ALL_ALTERNATIVES ((alternative_mask) -1) |
#define | ALTERNATIVE_BIT(X) |
#define | memory_address_p(mode, addr) |
#define | strict_memory_address_p(mode, addr) |
#define | offsettable_address_p(strict, mode, addr) |
#define | INSN_OUTPUT_FORMAT_NONE 0 /* abort @endverbatim */ |
#define | INSN_OUTPUT_FORMAT_SINGLE 1 /* const char * @endverbatim */ |
#define | INSN_OUTPUT_FORMAT_MULTI 2 /* const char * const * @endverbatim */ |
#define | INSN_OUTPUT_FORMAT_FUNCTION 3 /* const char * (*)(...) @endverbatim */ |
#define | this_target_recog (&default_target_recog) |
Typedefs | |
typedef bool(* | insn_operand_predicate_fn) (rtx, machine_mode) |
typedef const char *(* | insn_output_fn) (rtx *, rtx_insn *) |
Enumerations | |
enum | op_type { OP_IN , OP_OUT , OP_INOUT } |
enum | bool_attr { BA_ENABLED , BA_PREFERRED_FOR_SPEED , BA_PREFERRED_FOR_SIZE , BA_LAST = BA_PREFERRED_FOR_SIZE } |
Variables | |
int | volatile_ok |
int | which_alternative |
struct recog_data_d | recog_data |
const operand_alternative * | recog_op_alt |
const struct insn_data_d | insn_data [] |
int | peep2_current_count |
struct target_recog | default_target_recog |
#define ALL_ALTERNATIVES ((alternative_mask) -1) |
A mask of all alternatives.
Referenced by add_regs_to_insn_regno_info(), collect_non_operand_hard_regs(), get_bool_attr_mask(), get_bool_attr_mask_uncached(), and lra_set_insn_recog_data().
#define ALTERNATIVE_BIT | ( | X | ) |
A mask containing just alternative X.
Referenced by ira_get_dup_out_num(), ira_setup_alts(), and process_alt_operands().
#define INSN_OUTPUT_FORMAT_FUNCTION 3 /* const char * (*)(...) @endverbatim */ |
#define INSN_OUTPUT_FORMAT_MULTI 2 /* const char * const * @endverbatim */ |
#define INSN_OUTPUT_FORMAT_NONE 0 /* abort @endverbatim */ |
Legal values for insn_data.output_format. Indicate what type of data is stored in insn_data.output.
#define INSN_OUTPUT_FORMAT_SINGLE 1 /* const char * @endverbatim */ |
#define MAX_RECOG_ALTERNATIVES 35 |
Declarations for interface to insn recognizer and insn-output.cc. Copyright (C) 1987-2024 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/>.
For enum tree_code ERROR_MARK.
Random number that should be large enough for all purposes. Also define a type that has at least MAX_RECOG_ALTERNATIVES + 1 bits, with the extra bit giving an invalid value that can be used to mean "uninitialized".
Referenced by check_operand_nalternatives(), and extract_insn().
#define memory_address_p | ( | mode, | |
addr ) |
Referenced by address_operand(), combine_stack_adjustments_for_block(), default_legitimate_address_p(), eliminate_regs_1(), init_reload(), and plus_constant().
#define offsettable_address_p | ( | strict, | |
mode, | |||
addr ) |
#define strict_memory_address_p | ( | mode, | |
addr ) |
Referenced by constrain_operands(), default_legitimate_address_p(), and init_caller_save().
#define this_target_recog (&default_target_recog) |
Referenced by check_bool_attrs(), get_bool_attr_mask(), preprocess_insn_constraints(), and recog_init().
A table defined in insn-output.cc that give information about each insn-code value.
enum bool_attr |
enum op_type |
|
extern |
Referenced by insn_invalid_p(), and recog_for_combine_1().
|
extern |
Referenced by can_assign_to_reg_without_clobbers_p(), and insn_invalid_p().
|
inline |
Return the class for operand I of alternative ALT, taking matching constraints into account.
References operand_alternative::cl, i, and operand_alternative::matches.
Referenced by build_def_use(), check_and_make_def_conflict(), copyprop_hardreg_forward_1(), process_register_constraint_filters(), and record_out_operands().
|
inline |
Return the mask of register filters that should be applied to operand I of alternative ALT, taking matching constraints into account.
References i, and register_filters.
Referenced by process_register_constraint_filters().
|
extern |
Apply a group of changes previously issued with `validate_change'. If all changes are valid, call confirm_change_group and return true, otherwise, call cancel_changes and return false.
References cancel_changes(), confirm_change_group(), and verify_changes().
Referenced by apply_debug_insn_changes(), canonicalize_insn(), combine_reaching_defs(), cond_exec_process_if_block(), copyprop_hardreg_forward_1(), cse_change_cc_mode_insn(), cse_insn(), decompose_multiword_subregs(), expand_var_during_unrolling(), fold_rtx(), invert_jump(), move_invariant_reg(), redirect_jump(), regrename_do_replace(), reload_combine_recognize_pattern(), reload_cse_simplify(), reload_cse_simplify_operands(), replace_uses(), resolve_simple_move(), split_live_ranges_for_shrink_wrap(), try_apply_stack_adjustment(), try_back_substitute_reg(), try_eliminate_compare(), try_merge_compare(), try_replace_reg(), validate_change_1(), validate_replace_rtx(), validate_replace_rtx_part(), validate_replace_rtx_part_nosimplify(), validate_replace_rtx_subexp(), and validate_simplify_insn().
|
extern |
Check if an asm_operand matches its constraints. Return > 0 if ok, = 0 if bad, < 0 if inconclusive.
References address_operand(), asm_operand_ok(), AUTO_INC_DEC, CONST_INT_P, constraints, end(), extract_mem_from_operand(), gcc_assert, general_operand(), GET_CODE, GET_MODE, INTVAL, MEM_P, memory_operand(), NULL, offsettable_nonstrict_memref_p(), register_operand(), reload_completed, and XEXP.
Referenced by asm_operand_ok(), check_asm_operands(), and expand_asm_stmt().
|
extern |
Retract the changes numbered NUM and up.
References changes, gcc_assert, i, INSN_CODE, undo_recog_changes::is_active(), change_t::loc, MEM_P, num_changes, change_t::old, change_t::old_code, change_t::old_len, and XVECLEN.
Referenced by apply_change_group(), insn_propagation::apply_to_pattern(), insn_propagation::apply_to_rvalue(), insn_propagation::apply_to_rvalue_1(), combine_reaching_defs(), cond_exec_find_if_block(), cond_exec_process_if_block(), dead_or_predicable(), equiv_can_be_consumed_p(), pair_fusion_bb_info::fuse_pair(), inv_can_prop_to_addr_use(), invert_jump(), reload_as_needed(), try_fwprop_subst_pattern(), try_merge_compare(), pair_fusion::try_promote_writeback(), try_replace_reg(), vt_initialize(), and insn_change_watermark::~insn_change_watermark().
Keep X canonicalized if some changes have made it non-canonical; only modifies the operands of X, not (for example) its code. Simplifications are not the job of this routine. Return true if anything was changed.
References COMMUTATIVE_P, swap_commutative_operands_p(), validate_unshare_change(), and XEXP.
Referenced by fold_rtx().
Check that X is an insn-body for an `asm' with operands and that the operands mentioned in it are legitimate.
References asm_labels_ok(), asm_noperands(), asm_operand_ok(), constrain_operands(), constraints, decode_asm_operands(), extract_insn(), get_enabled_alternatives(), i, recog_data_d::insn, make_insn_raw(), NULL, reload_completed, and which_alternative.
Referenced by insn_invalid_p(), instantiate_virtual_regs_in_insn(), recog_for_combine(), recog_for_combine_1(), simplify_set(), and try_combine().
Assert that the cached boolean attributes for INSN are still accurate. The backend is required to define these attributes in a way that only depends on the current target (rather than operands, compiler phase, etc.).
References BA_LAST, gcc_assert, get_bool_attr_mask_uncached(), i, validate_replace_src_data::insn, INSN_CODE, and this_target_recog.
Referenced by lra_update_insn_recog_data().
|
extern |
A group of changes has previously been issued with validate_change and verified with verify_changes. Call df_insn_rescan for each of the insn changed and clear num_changes.
References as_a(), changes, copy_rtx(), df_insn_rescan(), gcc_assert, i, INSN_P, undo_recog_changes::is_active(), change_t::loc, NULL, num_changes, and change_t::object.
Referenced by apply_change_group(), dead_or_predicable(), pair_fusion_bb_info::fuse_pair(), redirect_jump_2(), reload_as_needed(), try_fwprop_subst_notes(), try_fwprop_subst_pattern(), and pair_fusion::try_promote_writeback().
|
extern |
References AUTO_INC_DEC, CONSTANT_P, constrain_operands(), constraints, recog_data_d::constraints, end(), general_operand(), GET_CODE, GET_MODE, i, recog_data_d::is_asm, MEM_P, recog_data_d::n_alternatives, recog_data_d::n_operands, NULL, offset, OP_OUT, recog_data_d::operand, recog_data_d::operand_mode, recog_data_d::operand_type, operands_match_p(), funny_match::other, recog_data, reg_equiv_mem, reg_fits_class_p(), REG_P, reg_renumber, REGNO, reload_in_progress, safe_from_earlyclobber(), SCALAR_INT_MODE_P, skip_alternative(), strict_memory_address_p, SUBREG_BYTE, SUBREG_REG, subreg_regno_offset(), targetm, TEST_BIT, TEST_HARD_REG_BIT, funny_match::this_op, which_alternative, and XEXP.
Referenced by can_reload_into(), check_asm_operands(), combine_reaching_defs(), constrain_operands(), constrain_operands_cached(), eliminate_partially_redundant_load(), emit_input_reload_insns(), emit_insn_if_valid_for_reload_1(), extract_constrain_insn(), extract_constrain_insn_cached(), fill_slots_from_thread(), gen_reload_chain_without_interm_reg_p(), inc_for_reload(), insn_invalid_p(), reg_save_code(), reload(), reload_as_needed(), setup_prohibited_mode_move_regs(), and valid_insn_p().
Do cached constrain_operands on INSN and complain about failures.
References constrain_operands(), get_enabled_alternatives(), validate_replace_src_data::insn, and which_alternative.
Referenced by final_scan_insn_1().
Copies frame related info of an insn (OLD_INSN) to the single insn (NEW_INSN) that was obtained by splitting OLD_INSN.
References add_reg_note(), gcc_assert, maybe_copy_prologue_epilogue_insn(), NULL, REG_NOTE_KIND, REG_NOTES, rtx_equal_p(), RTX_FRAME_RELATED_P, single_set(), and XEXP.
Referenced by peep2_attempt(), and try_split().
|
extern |
Do uncached extract_insn, constrain_operands and complain about failures. This should be used when extracting a pre-existing constrained instruction if the caller wants to know which alternative was chosen.
References constrain_operands(), extract_insn(), fatal_insn_not_found, get_enabled_alternatives(), validate_replace_src_data::insn, and reload_completed.
Referenced by build_def_use(), check_rtl(), copyprop_hardreg_forward_1(), and reload_cse_simplify_operands().
|
extern |
Do cached extract_insn, constrain_operands and complain about failures. Used by insn_attrtab.
References constrain_operands(), extract_insn_cached(), fatal_insn_not_found, get_enabled_alternatives(), validate_replace_src_data::insn, reload_completed, and which_alternative.
|
extern |
Analyze INSN and fill in recog_data.
References asm_noperands(), insn_operand_data::constraint, recog_data_d::constraints, decode_asm_operands(), fatal_insn_not_found, gcc_assert, GET_CODE, GET_MODE, i, recog_data_d::insn, validate_replace_src_data::insn, insn_data, insn_extract(), recog_data_d::is_asm, insn_operand_data::is_operator, recog_data_d::is_operator, MAX_RECOG_ALTERNATIVES, insn_operand_data::mode, insn_data_d::n_alternatives, recog_data_d::n_alternatives, insn_data_d::n_dups, recog_data_d::n_dups, insn_data_d::n_operands, recog_data_d::n_operands, NULL, OP_IN, OP_INOUT, OP_OUT, insn_data_d::operand, recog_data_d::operand, recog_data_d::operand_loc, recog_data_d::operand_mode, recog_data_d::operand_type, PATTERN(), recog_data, recog_memoized(), SET, SET_SRC, which_alternative, and XVECEXP.
Referenced by can_reload_into(), check_asm_operands(), combine_reaching_defs(), decompose_multiword_subregs(), eliminate_partially_redundant_load(), eliminate_regs_in_insn(), elimination_costs_in_insn(), emit_input_reload_insns(), emit_insn_if_valid_for_reload_1(), extract_constrain_insn(), extract_insn_cached(), fill_slots_from_thread(), find_reloads(), gen_reload_chain_without_interm_reg_p(), inc_for_reload(), insn_invalid_p(), instantiate_virtual_regs_in_insn(), ira(), ira_remove_insn_scratches(), ira_restore_scratches(), ira_setup_alts(), reg_save_code(), reload(), reload_as_needed(), scan_one_insn(), setup_prohibited_mode_move_regs(), union_match_dups(), and valid_insn_p().
|
extern |
Like extract_insn, but save insn extracted and don't extract again, when called again for the same insn expecting that recog_data still contain the valid information. This is used primary by gen_attr infrastructure that often does extract insn again and again.
References extract_insn(), recog_data_d::insn, validate_replace_src_data::insn, INSN_CODE, and recog_data.
Referenced by cleanup_subreg_operands(), and extract_constrain_insn_cached().
alternative_mask get_enabled_alternatives | ( | rtx_insn * | insn | ) |
Return the set of alternatives of INSN that are allowed by the current target.
References BA_ENABLED, get_bool_attr_mask(), and validate_replace_src_data::insn.
Referenced by can_reload_into(), check_asm_operands(), constrain_operands_cached(), emit_input_reload_insns(), emit_insn_if_valid_for_reload_1(), extract_constrain_insn(), extract_constrain_insn_cached(), find_reloads(), gen_reload_chain_without_interm_reg_p(), inc_for_reload(), reg_save_code(), reload(), reload_as_needed(), setup_prohibited_mode_move_regs(), and valid_insn_p().
alternative_mask get_preferred_alternatives | ( | rtx_insn * | insn | ) |
Return the set of alternatives of INSN that are allowed by the current target and are preferred for the current size/speed optimization choice.
References BA_PREFERRED_FOR_SIZE, BA_PREFERRED_FOR_SPEED, BLOCK_FOR_INSN(), get_bool_attr_mask(), validate_replace_src_data::insn, and optimize_bb_for_speed_p().
Referenced by can_use_same_reg_p(), combine_reaching_defs(), eliminate_partially_redundant_load(), fill_slots_from_thread(), insn_invalid_p(), ira_setup_alts(), lra_set_insn_recog_data(), record_reg_classes(), and reload_cse_simplify_operands().
alternative_mask get_preferred_alternatives | ( | rtx_insn * | insn, |
basic_block | bb ) |
Return the set of alternatives of INSN that are allowed by the current target and are preferred for the size/speed optimization choice associated with BB. Passing a separate BB is useful if INSN has not been emitted yet or if we are considering moving it to a different block.
References BA_PREFERRED_FOR_SIZE, BA_PREFERRED_FOR_SPEED, get_bool_attr_mask(), validate_replace_src_data::insn, and optimize_bb_for_speed_p().
True if the dependency between OUT_INSN and IN_INSN is in the IF_THEN_ELSE condition, and not the THEN or ELSE branch. OUT_INSN may be either a single or multiple set; IN_INSN should be single_set for truth, but for convenience of insn categorization may be any JUMP or CALL insn.
References CALL_P, exp(), gcc_assert, GET_CODE, i, JUMP_P, PATTERN(), reg_mentioned_p(), SET, SET_DEST, SET_SRC, single_set(), XEXP, XVECEXP, and XVECLEN.
|
extern |
References volatile_ok.
Referenced by combine_instructions(), cse_main(), final_1(), find_costs_and_classes(), instantiate_virtual_regs(), and reload().
|
extern |
Initialize data used by the function `recog'. This must be called once in the compilation of a function before any insn recognition may be done in the function.
References volatile_ok.
Referenced by combine_instructions(), expand_function_start(), and rest_of_clean_state().
|
extern |
Referenced by extract_insn(), lra_set_insn_recog_data(), and lra_update_insn_recog_data().
This subroutine of apply_change_group verifies whether the changes to INSN were valid; i.e. whether INSN can still be recognized. If IN_GROUP is true clobbers which have to be added in order to match the instructions will be added to the current change group. Otherwise the changes will take effect immediately.
References add_clobbers(), added_clobbers_hard_reg_p(), asm_noperands(), check_asm_operands(), check_invalid_inc_dec(), constrain_operands(), extract_insn(), FIND_REG_INC_NOTE, GET_CODE, get_preferred_alternatives(), INSN_CODE, note_stores(), NULL_RTX, PATTERN(), recog(), REG_NOTE_KIND, reload_completed, reload_in_progress, rtvec_alloc(), SET, validate_change(), XEXP, and XVECEXP.
Referenced by prepare_copy_insn(), replace_read(), try_validate_parallel(), and verify_changes().
|
extern |
Return true if ADDR is a valid memory address for mode MODE in address space AS.
References ADDR_SPACE_GENERIC_P, gcc_assert, and targetm.
Referenced by addr_offset_valid_p(), address_cost(), adjust_address_1(), change_address_1(), emit_move_insn(), expand_expr_real_1(), find_split_point(), gen_lowpart_if_possible(), general_operand(), get_address_cost(), get_address_cost_ainc(), inv_can_prop_to_addr_use(), maybe_memory_address_addr_space_p(), memory_address_addr_space(), multiplier_allowed_in_address_p(), offset_address(), offsettable_address_addr_space_p(), try_replace_in_use(), valid_mem_ref_p(), validate_autoinc_and_mem_addr_p(), validize_mem(), and verify_changes().
|
extern |
Return true if ADDR is an address-expression whose effect depends on the mode of the memory reference it is used in. ADDRSPACE is the address space associated with the address. Autoincrement addressing is a typical example of mode-dependence because the amount of the increment depends on the mode.
References GET_CODE, and targetm.
Referenced by combine_simplify_rtx(), convert_mode_scalar(), find_reloads(), gen_lowpart_for_combine(), make_extraction(), offsettable_address_addr_space_p(), push_reload(), simple_move_operand(), simplify_shift_const_1(), simplify_context::simplify_subreg(), simplify_context::simplify_truncation(), simplify_context::simplify_unary_operation_1(), and simplify_while_replacing().
|
extern |
Return number of changes made and not validated yet.
References num_changes.
Referenced by try_replace_reg(), and validate_simplify_insn().
|
extern |
Return the number of changes so far in the current group.
References num_changes.
Referenced by insn_propagation::apply_to_mem_1(), insn_propagation::apply_to_pattern(), insn_propagation::apply_to_rvalue(), insn_propagation::apply_to_rvalue_1(), dead_or_predicable(), decompose_multiword_subregs(), invert_jump_1(), insn_change_watermark::keep(), redirect_jump_1(), resolve_reg_notes(), and insn_change_watermark::~insn_change_watermark().
|
extern |
Return true if Y is a memory address which contains no side effects and would remain valid for address space AS after the addition of a positive integer less than the size of that mode. We assume that the original address is valid and do not check it. We do check that it is valid for narrower modes. If STRICTP is nonzero, we require a strictly valid address, for the sake of use in reload.cc.
References bool, CONSTANT_ADDRESS_P, find_constant_term_loc(), GET_CODE, GET_MODE, GET_MODE_ALIGNMENT, GET_MODE_SIZE(), GET_RTX_CLASS, known_eq, known_le, memory_address_addr_space_p(), mode_dependent_address_p(), plus_constant(), RTX_AUTOINC, strict_memory_address_addr_space_p(), targetm, XEXP, and y.
Referenced by offsettable_memref_p(), and offsettable_nonstrict_memref_p().
Return true if OP is a memory reference whose address contains no side effects and remains valid after the addition of a positive integer less than the size of the object being referenced. We assume that the original address is valid and do not check it. This uses strict_memory_address_p as a subroutine, so don't use it before reload.
References GET_MODE, MEM_ADDR_SPACE, MEM_P, offsettable_address_addr_space_p(), and XEXP.
Referenced by find_reloads().
Similar, but don't require a strictly valid mem ref: consider pseudo-regs valid as index or base regs.
References GET_MODE, MEM_ADDR_SPACE, MEM_P, offsettable_address_addr_space_p(), and XEXP.
Referenced by asm_operand_ok(), and find_reloads().
|
extern |
Return the Nth non-note insn after `current', or return NULL_RTX if it does not exist. Used by the recognizer to find the next insn to match in a multi-insn pattern.
References gcc_assert, peep2_insn_data::insn, peep2_buf_position(), peep2_current, and peep2_current_count.
Similarly for a REG.
References END_REGNO(), gcc_assert, peep2_insn_data::insn, peep2_insn_data::live_before, NULL_RTX, peep2_buf_position(), peep2_current, REGNO, and REGNO_REG_SET_P.
|
extern |
Return true if REGNO is dead before the Nth non-note insn after `current'.
References gcc_assert, peep2_insn_data::insn, peep2_insn_data::live_before, NULL_RTX, peep2_buf_position(), peep2_current, and REGNO_REG_SET_P.
Referenced by peephole2_optimize().
|
extern |
Fill in OP_ALT_BASE for an instruction that has N_OPERANDS operands, N_ALTERNATIVES alternatives and constraint strings CONSTRAINTS. OP_ALT_BASE has N_ALTERNATIVES * N_OPERANDS entries and CONSTRAINTS has N_OPERANDS entries. OPLOC should be passed in if the insn is an asm statement and preprocessing should take the asm operands into account, e.g. to determine whether they could be addresses in constraints that require addresses; it should then point to an array of pointers to each operand.
References ADDR_SPACE_GENERIC, address_operand(), operand_alternative::anything_ok, base_reg_class(), operand_alternative::cl, operand_alternative::constraint, constraints, operand_alternative::earlyclobber, end(), get_register_filter_id(), i, operand_alternative::is_address, operand_alternative::matched, operand_alternative::matches, operand_alternative::memory_ok, n_alternatives(), n_operands, reg_class_subunion, operand_alternative::register_filters, and operand_alternative::reject.
Referenced by build_def_use(), copyprop_hardreg_forward_1(), ira_setup_alts(), lra_set_insn_recog_data(), preprocess_constraints(), and preprocess_insn_constraints().
|
extern |
After calling extract_insn, you can use this function to extract some information from the constraint strings into a more usable form. The collected data is stored in recog_op_alt.
References asm_op_alt, recog_data_d::constraints, INSN_CODE, n_alternatives(), recog_data_d::n_alternatives, n_operands, recog_data_d::n_operands, NULL, preprocess_constraints(), preprocess_insn_constraints(), recog_data, and recog_op_alt.
|
extern |
Return an array of operand_alternative instructions for instruction ICODE.
References constraints, gcc_checking_assert, i, IN_RANGE, insn_data, MAX, n_alternatives(), insn_data_d::n_operands, n_operands, NULL, preprocess_constraints(), and this_target_recog.
Referenced by lra_set_insn_recog_data(), and preprocess_constraints().
void recog_init | ( | ) |
(Re)initialize the target information after a change in target.
References free(), i, and this_target_recog.
Referenced by backend_init_target(), and reinit_regs().
|
inline |
Try recognizing the instruction INSN, and return the code number that results. Remember the code so that repeated calls do not need to spend the time for actual rerecognition. This function is the normal interface to instruction recognition. The automatically-generated function `recog' is normally called through this one.
References INSN_CODE, PATTERN(), and recog().
Referenced by base_to_reg(), can_reload_into(), check_rtl(), combine_reaching_defs(), combine_reload_insn(), decompose_multiword_subregs(), default_print_patchable_function_entry(), do_remat(), eliminate_regs_in_insn(), eliminate_regs_in_insn(), elimination_costs_in_insn(), emit_add3_insn(), address_reload_context::emit_autoinc(), emit_insn_if_valid_for_reload_1(), emit_move_list(), end_ifcvt_sequence(), extract_insn(), fill_slots_from_thread(), final_scan_insn_1(), find_cond_trap(), gen_reload_chain_without_interm_reg_p(), inc_for_reload(), instantiate_virtual_regs_in_insn(), ira_emit(), lra_emit_add(), lra_set_insn_recog_data(), noce_convert_multiple_sets(), noce_emit_cmove(), noce_emit_czero(), noce_emit_insn(), noce_emit_move_insn(), noce_emit_store_flag(), optimize_skip(), process_address_1(), reg_save_code(), reload_as_needed(), scan_loop(), setup_prohibited_mode_move_regs(), and valid_insn_p().
|
extern |
Return true iff OPERAND (assumed to be a REG rtx) is a hard reg in class CLASS when its regno is offset by OFFSET and changed to mode MODE. If REG occupies multiple hard regs, all of them must be in CLASS.
References HARD_REGISTER_NUM_P, in_hard_reg_set_p(), offset, reg_class_contents, and REGNO.
Referenced by constrain_operands(), find_reloads(), record_reg_classes(), and reload_cse_simplify_operands().
|
inline |
Skip chars until the next ',' or the end of the string. This is useful to skip alternatives in a constraint string.
References r.
Referenced by constrain_operands(), find_reloads(), and record_reg_classes().
True if the dependency between OUT_INSN and IN_INSN is on the store data not the address operand(s) of the store. IN_INSN and OUT_INSN must be either a single_set or a PARALLEL with SETs inside.
References gcc_assert, GET_CODE, i, PATTERN(), SET, single_set(), store_data_bypass_p_1(), XVECEXP, and XVECLEN.
|
extern |
Return true if ADDR is a valid memory address for mode MODE in address space AS, and check that each pseudo reg has the proper kind of hard reg.
References ADDR_SPACE_GENERIC_P, gcc_assert, replacement::mode, and targetm.
Referenced by find_reloads_address(), find_reloads_subreg_address(), get_secondary_mem(), offsettable_address_addr_space_p(), operand_subword(), and reload().
Check whether INSN matches a specific alternative of an .md pattern.
References constrain_operands(), extract_insn(), get_enabled_alternatives(), validate_replace_src_data::insn, INSN_CODE, and recog_memoized().
Referenced by default_zero_call_used_regs(), and find_cond_trap().
Wrapper for validate_change_1 without the UNSHARE argument defaulting UNSHARE to false.
References validate_change_1().
Referenced by adjust_insn(), adjust_mem_stores(), adjust_mem_uses(), apply_debug_insn_changes(), insn_propagation::apply_to_rvalue_1(), attempt_change(), can_eliminate_compare(), canon_asm_operands(), canonicalize_insn(), combine_set_extension(), cond_exec_process_insns(), copyprop_hardreg_forward_1(), cse_change_cc_mode(), cse_insn(), cse_process_note_1(), eliminate_regs_in_insn(), eliminate_regs_in_insn(), ext_dce_try_optimize_insn(), find_moveable_pseudos(), fixup_debug_insns(), fold_rtx(), pair_fusion_bb_info::fuse_pair(), insn_invalid_p(), invert_exp_1(), maybe_select_cc_mode(), move2add_use_add2_insn(), move2add_use_add3_insn(), move_invariant_reg(), move_unallocated_pseudos(), pre_insert_copy_insn(), redirect_exp_1(), regrename_do_replace(), reload_combine_recognize_pattern(), reload_cse_move2add(), reload_cse_simplify_operands(), reload_cse_simplify_set(), replace_oldest_value_reg(), replace_read(), replace_uses(), reset_debug_uses_in_loop(), resolve_clobber(), resolve_subreg_use(), simplify_while_replacing(), split_iv(), split_live_ranges_for_shrink_wrap(), transform_ifelse(), try_apply_stack_adjustment(), try_back_substitute_reg(), try_eliminate_compare(), try_replace_in_use(), try_replace_reg(), update_reg_equal_equiv_notes(), validate_canon_reg(), validate_simplify_insn(), and verify_changes().
Change XVECLEN (*LOC, 0) to NEW_LEN. OBJECT, IN_GROUP and the return value are as for validate_change_1.
References validate_change_1().
Try replacing every occurrence of FROM in INSN with TO. After all changes have been made, validate by seeing if INSN is still valid.
References apply_change_group(), PATTERN(), and validate_replace_rtx_1().
Referenced by combine_and_move_insns(), decrease_live_ranges_number(), fill_slots_from_thread(), and indirect_jump_optimize().
Try replacing every occurrence of FROM in INSN with TO. This also will replace in REG_EQUAL and REG_EQUIV notes.
References PATTERN(), REG_NOTE_KIND, REG_NOTES, validate_replace_rtx_1(), and XEXP.
Referenced by expand_var_during_unrolling(), and reload_as_needed().
Try replacing every occurrence of FROM in WHERE with TO. Assume that WHERE is a part of INSN. After all changes have been made, validate by seeing if INSN is still valid. validate_replace_rtx (from, to, insn) is equivalent to validate_replace_rtx_part (from, to, &PATTERN (insn), insn).
References apply_change_group(), and validate_replace_rtx_1().
Same as above, but do not simplify rtx afterwards.
References apply_change_group(), and validate_replace_rtx_1().
Try replacing every occurrence of FROM in subexpression LOC of INSN with TO. After all changes have been made, validate by seeing if INSN is still valid.
References apply_change_group(), and validate_replace_rtx_1().
Try replacing every occurrence of FROM in INSN with TO, avoiding SET_DESTs.
References validate_replace_src_data::from, validate_replace_src_data::insn, note_uses(), PATTERN(), validate_replace_src_data::to, and validate_replace_src_1().
Referenced by equiv_can_be_consumed_p(), and try_replace_reg().
Try simplify INSN. Invoke simplify_rtx () on every SET_SRC and SET_DEST inside the INSN's pattern and return true if something was simplified.
References apply_change_group(), GET_CODE, i, validate_replace_src_data::insn, NULL, num_changes_pending(), PATTERN(), rtx_equal_p(), SET, SET_DEST, SET_SRC, simplify_rtx(), validate_change(), XVECEXP, and XVECLEN.
Wrapper for validate_change_1 without the UNSHARE argument defaulting UNSHARE to true.
References validate_change_1().
Referenced by insn_propagation::apply_to_rvalue_1(), canonicalize_change_group(), copyprop_hardreg_forward_1(), cprop_jump(), cse_insn(), decompose_multiword_subregs(), fold_rtx(), pair_fusion_bb_info::fuse_pair(), inv_can_prop_to_addr_use(), reload_combine_recognize_pattern(), reload_cse_simplify_set(), simplify_while_replacing(), pair_fusion::try_promote_writeback(), and validate_replace_rtx_1().
|
extern |
Tentatively apply the changes numbered NUM and up. Return true if all changes are valid, false otherwise.
References as_a(), asm_noperands(), changes, DEBUG_INSN_P, GET_CODE, GET_MODE, i, insn_invalid_p(), MEM_ADDR_SPACE, MEM_P, memory_address_addr_space_p(), NULL_RTX, num_changes, change_t::object, PATTERN(), REG_P, register_asm_p(), rtvec_alloc(), validate_change(), XEXP, XVECEXP, and XVECLEN.
Referenced by apply_change_group(), dead_or_predicable(), equiv_can_be_consumed_p(), inv_can_prop_to_addr_use(), and reload_as_needed().
|
inline |
Return a pointer to an array in which index OP describes the constraints on operand OP of the current instruction alternative (which_alternative). Only valid after calling preprocess_constraints and constrain_operands.
References gcc_checking_assert, IN_RANGE, recog_data_d::n_alternatives, recog_data_d::n_operands, recog_data, recog_op_alt, and which_alternative.
Referenced by build_def_use(), copyprop_hardreg_forward_1(), hide_operands(), and record_out_operands().
|
extern |
|
extern |
Referenced by can_reuse_operands_p(), can_vec_extract_var_idx_p(), can_vec_set_var_idx_p(), check_and_process_move(), combine_reloads(), debug_reload_to_stream(), default_cstore_mode(), default_secondary_reload(), eliminate_regs_in_insn(), eliminate_regs_in_insn(), elimination_costs_in_insn(), emit_block_move_via_pattern(), expand_atomic_compare_and_swap(), expand_binop_directly(), expand_builtin_feclear_feraise_except(), expand_builtin_fegetround(), expand_cmpstr(), expand_cmpstrn_or_cmpmem(), expand_copysign_absneg(), expand_fn_using_insn(), expand_mult_highpart(), expand_twoval_binop(), expand_vector_conversion(), extract_bit_field_1(), extract_insn(), find_reloads(), get_bool_attr_mask_uncached(), get_insn_template(), get_optab_extraction_insn(), get_static_insn_data(), get_supported_else_vals(), get_traditional_extraction_insn(), insn_operand_matches(), instantiate_virtual_regs_in_insn(), lra_set_insn_recog_data(), maybe_emit_atomic_test_and_set(), maybe_gen_insn(), maybe_legitimize_operand(), maybe_legitimize_operand_same_code(), output_asm_name(), prepare_cmp_insn(), prepare_operand(), preprocess_insn_constraints(), push_secondary_reload(), reload_adjust_reg_for_icode(), scratch_reload_class(), set_storage_via_setmem(), simplify_vector_constructor(), simplify_while_replacing(), supportable_narrowing_operation(), supportable_widening_operation(), vect_maybe_permute_loop_masks(), vect_supportable_direct_optab_p(), and vectorizable_shift().
|
extern |
The number of instructions available to match a peep2.
Referenced by peep2_fill_buffer(), peep2_next_insn(), peep2_reinit_state(), peep2_update_life(), and peephole2_optimize().
|
extern |
Referenced by add_insn_allocno_copies(), build_def_use(), can_reload_into(), can_use_same_reg_p(), check_and_make_def_conflict(), check_and_make_def_use_conflict(), cleanup_subreg_operands(), constrain_operands(), copyprop_hardreg_forward_1(), decompose_multiword_subregs(), eliminate_regs_in_insn(), elimination_costs_in_insn(), extract_insn(), extract_insn_cached(), final_scan_insn_1(), find_reloads(), find_reloads_subreg_address(), find_reloads_toplev(), get_bool_attr_mask_uncached(), get_insn_template(), get_static_insn_data(), hide_operands(), instantiate_virtual_regs_in_insn(), ira(), ira_get_dup_out_num(), ira_implicitly_set_insn_hard_regs(), ira_register_new_scratch_op(), ira_remove_insn_scratches(), ira_restore_scratches(), ira_setup_alts(), lra_set_insn_recog_data(), lra_update_insn_recog_data(), make_early_clobber_and_input_conflicts(), maybe_fix_stack_asms(), preprocess_constraints(), process_reg_shuffles(), process_register_constraint_filters(), process_single_reg_class_operands(), record_operand_costs(), record_out_operands(), record_reg_classes(), reload_cse_simplify_operands(), restore_operands(), scan_one_insn(), scan_rtx_reg(), simple_move(), single_reg_class(), single_reg_operand_class(), swap_change(), union_match_dups(), which_op_alt(), and recog_data_saver::~recog_data_saver().
|
extern |
Contains a vector of operand_alternative structures, such that operand OP of alternative A is at index A * n_operands + OP. Set up by preprocess_constraints.
Referenced by can_use_same_reg_p(), check_and_make_def_conflict(), ira_get_dup_out_num(), ira_setup_alts(), make_early_clobber_and_input_conflicts(), preprocess_constraints(), process_register_constraint_filters(), and which_op_alt().
|
extern |
Nonzero means volatile operands are recognized.
Nonzero means allow operands to be volatile. This should be 0 if you are generating rtl, such as if you are calling the functions in optabs.cc and expmed.cc (most of the time). This should be 1 if all valid insns need to be recognized, such as in reginfo.cc and final.cc and reload.cc. init_recog and init_recog_no_volatile are responsible for setting this.
Referenced by general_operand(), init_recog(), init_recog_no_volatile(), temporary_volatile_ok::temporary_volatile_ok(), and temporary_volatile_ok::~temporary_volatile_ok().
|
extern |
Set by constrain_operands to the number of the alternative that matched.
On return from `constrain_operands', indicate which alternative was satisfied.
Referenced by check_asm_operands(), constrain_operands(), constrain_operands_cached(), extract_constrain_insn_cached(), extract_insn(), get_bool_attr_mask_uncached(), get_insn_template(), output_asm_name(), reload_cse_simplify_operands(), validate_insn_alternatives(), and which_op_alt().