GCC Middle and Back End API Reference
|
Data Structures | |
struct | change_t |
struct | validate_replace_src_data |
struct | funny_match |
struct | peep2_insn_data |
Typedefs | |
typedef struct change_t | change_t |
Variables | |
int | volatile_ok |
struct recog_data_d | recog_data |
struct operand_alternative | recog_op_alt [MAX_RECOG_OPERANDS][MAX_RECOG_ALTERNATIVES] |
int | which_alternative |
int | reload_completed |
int | epilogue_completed |
static change_t * | changes |
static int | changes_allocated |
static int | num_changes = 0 |
static struct peep2_insn_data | peep2_insn_data [MAX_INSNS_PER_PEEP2+1] |
static int | peep2_current |
static bool | peep2_do_rebuild_jump_labels |
static bool | peep2_do_cleanup_cfg |
int | peep2_current_count |
int address_operand | ( | ) |
Return 1 if OP is a valid memory address for a memory reference of mode MODE. The main use of this function is as a predicate in match_operand expressions in the machine description.
Referenced by asm_operand_ok(), get_dup_num(), and record_reg_classes().
int apply_change_group | ( | void | ) |
Apply a group of changes previously issued with `validate_change'. If all changes are valid, call confirm_change_group and return 1, otherwise, call cancel_changes and return 0.
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(), eliminate_regs_in_insn(), expand_var_during_unrolling(), fold_rtx(), forward_propagate_asm(), invert_jump(), move_invariant_reg(), optimize_reg_copy_3(), redirect_jump(), reload_combine_recognize_pattern(), reload_cse_simplify(), reload_cse_simplify_operands(), replace_uses(), resolve_simple_move(), try_apply_stack_adjustment(), try_auto_increment(), try_back_substitute_reg(), try_eliminate_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().
|
static |
Return true if labels in asm operands BODY are LABEL_REFs.
References extract_asm_operands().
Referenced by check_asm_operands().
int asm_noperands | ( | ) |
If BODY is an insn body that uses ASM_OPERANDS, return the number of operands (both input and output) in the insn. Otherwise return -1.
References extract_asm_operands(), and SET.
Referenced by adjust_insn(), assign_by_spills(), build_def_use(), check_asm_operands(), check_rtl(), copyprop_hardreg_forward_1(), create_log_links(), cselib_record_sets(), delete_trivially_dead_insns(), do_local_cprop(), do_output_reload(), dwarf2out_var_location(), eliminate_regs_in_insn(), elimination_costs_in_insn(), emit_input_reload_insns(), extract_insn(), failed_reload(), fill_slots_from_thread(), final_scan_insn(), forward_propagate_and_simplify(), get_attr_length_1(), get_reg_class(), instantiate_virtual_regs_in_insn(), lra_set_insn_recog_data(), lra_update_insn_recog_data(), maybe_fix_stack_asms(), need_fake_edge_p(), optimize_reg_copy_1(), prune_ready_list(), record_out_operands(), reload(), reload_as_needed(), reload_cse_simplify(), scan_loop(), schedule_block(), shorten_branches(), spill_failure(), stop_search_p(), subst_stack_regs(), try_combine(), update_equiv_regs(), and verify_changes().
int asm_operand_ok | ( | ) |
Check if an asm_operand matches its constraints. Return > 0 if ok, = 0 if bad, < 0 if inconclusive.
References address_operand(), general_operand(), len, memory_operand(), offsettable_nonstrict_memref_p(), register_operand(), and reload_completed.
Referenced by check_asm_operands(), and expand_asm_operands().
void cancel_changes | ( | ) |
Retract the changes numbered NUM and up.
References change_t::loc, num_changes, change_t::old, and change_t::old_code.
Referenced by apply_change_group(), combine_reaching_defs(), cond_exec_find_if_block(), cond_exec_process_if_block(), dead_or_predicable(), implicit_clobber_conflict_p(), invert_jump(), regmove_backward_pass(), reload_as_needed(), replace_dest_with_reg_ok_p(), replace_src_with_reg_ok_p(), try_fwprop_subst(), and vt_initialize().
bool canonicalize_change_group | ( | ) |
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 swap_commutative_operands_p(), and validate_unshare_change().
Referenced by fold_rtx().
int check_asm_operands | ( | ) |
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(), make_insn_raw(), reload_completed, and which_alternative.
Referenced by insn_invalid_p(), instantiate_virtual_regs_in_insn(), recog_for_combine(), simplify_set(), and try_combine().
int comparison_operator | ( | ) |
Return 1 if this is a comparison operator. This allows the use of MATCH_OPERATOR to recognize all the branch insns.
Referenced by write_test_expr().
void confirm_change_group | ( | void | ) |
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 copy_rtx(), df_insn_rescan(), change_t::loc, num_changes, and change_t::object.
Referenced by apply_change_group(), dead_or_predicable(), redirect_jump_2(), reload_as_needed(), and try_fwprop_subst().
int const_double_operand | ( | ) |
Returns 1 if OP is an operand that is a constant integer or constant floating-point number.
int const_int_operand | ( | ) |
Returns 1 if OP is an operand that is a CONST_INT.
References trunc_int_for_mode().
Referenced by maybe_legitimize_operand().
int constrain_operands | ( | ) |
References recog_data_d::alternative_enabled_p, recog_data_d::constraints, constraints, general_operand(), recog_data_d::is_asm, len, memory_address_addr_space_p(), recog_data_d::n_alternatives, recog_data_d::n_operands, offset, offsettable_memref_p(), offsettable_nonstrict_memref_p(), 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_fits_class_p(), reg_renumber, reload_in_progress, safe_from_earlyclobber(), skip_alternative(), strict_memory_address_addr_space_p(), subreg_regno_offset(), funny_match::this_op, and which_alternative.
Referenced by build_def_use(), can_reload_into(), check_asm_operands(), check_asm_stack_operands(), check_rtl(), constrain_operands_cached(), copyprop_hardreg_forward_1(), eliminate_partially_redundant_load(), emit_input_reload_insns(), emit_insn_if_valid_for_reload(), extract_constrain_insn_cached(), fill_slots_from_thread(), find_matches(), gen_reload_chain_without_interm_reg_p(), get_reg_class(), inc_for_reload(), insn_invalid_p(), reg_save_code(), reload(), reload_as_needed(), reload_cse_simplify_operands(), setup_prohibited_mode_move_regs(), and subst_asm_stack_regs().
int constrain_operands_cached | ( | ) |
Do cached constrain_operands and complain about failures.
References constrain_operands(), and which_alternative.
Referenced by final_scan_insn().
const char* decode_asm_operands | ( | rtx | body, |
rtx * | operands, | ||
rtx ** | operand_locs, | ||
const char ** | constraints, | ||
enum machine_mode * | modes, | ||
location_t * | loc | ||
) |
Assuming BODY is an insn body that uses ASM_OPERANDS, copy its operands (both input and output) into the vector OPERANDS, the locations of the operands within the insn into the vector OPERAND_LOCS, and the constraints for the operands into CONSTRAINTS. Write the modes of the operands into MODES. Return the assembler-template. If MODES, OPERAND_LOCS, CONSTRAINTS or OPERANDS is 0, we don't store that info.
References SET.
Referenced by asm_insn_count(), check_asm_operands(), extract_insn(), final_scan_insn(), lra_set_insn_recog_data(), lra_update_insn_recog_data(), and maybe_fix_stack_asms().
rtx extract_asm_operands | ( | ) |
If BODY is an insn body that uses ASM_OPERANDS, return it.
References SET.
Referenced by arithmetic_flags_clobber_p(), asm_labels_ok(), asm_noperands(), assign_by_spills(), create_trace_edges(), fixup_reorder_chain(), force_nonfallthru_and_redirect(), get_asm_operands_in_out(), instantiate_virtual_regs_in_insn(), make_edges(), mark_jump_label(), patch_jump_insn(), redirect_jump_1(), and rtl_split_edge().
void extract_constrain_insn_cached | ( | ) |
Do cached extract_insn, constrain_operands and complain about failures. Used by insn_attrtab.
References constrain_operands(), extract_insn_cached(), reload_completed, and which_alternative.
void extract_insn | ( | ) |
Analyze INSN and fill in recog_data.
References recog_data_d::alternative_enabled_p, asm_noperands(), insn_operand_data::constraint, recog_data_d::constraints, decode_asm_operands(), recog_data_d::insn, insn_data, insn_extract(), recog_data_d::is_asm, recog_data_d::is_operator, insn_operand_data::is_operator, memset(), recog_data_d::n_alternatives, insn_data_d::n_alternatives, recog_data_d::n_dups, insn_data_d::n_dups, recog_data_d::n_operands, insn_data_d::n_operands, OP_IN, OP_INOUT, OP_OUT, recog_data_d::operand, insn_data_d::operand, recog_data_d::operand_loc, recog_data_d::operand_mode, recog_data_d::operand_type, recog_data, recog_memoized(), SET, and which_alternative.
Referenced by add_insn_allocno_copies(), build_def_use(), can_reload_into(), check_asm_operands(), check_asm_stack_operands(), check_rtl(), copyprop_hardreg_forward_1(), 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(), extract_insn_cached(), fill_slots_from_thread(), find_matches(), find_reloads(), gen_reload_chain_without_interm_reg_p(), get_reg_class(), implicit_clobber_conflict_p(), inc_for_reload(), insn_invalid_p(), instantiate_virtual_regs_in_insn(), process_bb_node_lives(), reg_save_code(), reload(), reload_as_needed(), reload_cse_simplify_operands(), scan_one_insn(), sched_analyze_insn(), setup_prohibited_mode_move_regs(), subst_asm_stack_regs(), and union_match_dups().
void extract_insn_cached | ( | ) |
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, and recog_data.
Referenced by cleanup_subreg_operands(), and extract_constrain_insn_cached().
rtx* find_constant_term_loc | ( | ) |
Given an rtx *P, if it is a sum containing an integer constant term, return the location (type rtx *) of the pointer to that constant term. Otherwise, return a null pointer.
Referenced by offsettable_address_addr_space_p(), and plus_constant().
|
static |
The placement of the splitting that we do for shorten_branches depends on whether regstack is used by the target or not.
|
static |
|
static |
|
static |
int general_operand | ( | ) |
Return 1 if OP is a valid general operand for machine mode MODE. This is either a register reference, a memory reference, or a constant. In the case of a memory reference, the address is checked for general validity for the target machine. Register and memory references must have mode MODE in order to be valid, but some constants have no machine mode and are valid for any mode. If MODE is VOIDmode, OP is checked for validity for whatever mode it has. The main use of this function is as a predicate in match_operand expressions in the machine description.
References in_hard_reg_set_p(), lra_in_progress, memory_address_addr_space_p(), reload_completed, targetm, trunc_int_for_mode(), and volatile_ok.
Referenced by asm_operand_ok(), can_assign_to_reg_without_clobbers_p(), combine_simplify_rtx(), constrain_operands(), copy_to_mode_reg(), copy_to_reg(), eliminate_partially_redundant_loads(), force_reg(), hash_scan_set(), indirect_operand(), keep_with_call_p(), memory_operand(), noce_emit_cmove(), noce_emit_store_flag(), noce_try_addcc(), noce_try_cmove_arith(), nonimmediate_operand(), nonmemory_operand(), process_insert_insn(), register_operand(), and scan_one_insn().
int if_test_bypass_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 exp(), reg_mentioned_p(), and SET.
int immediate_operand | ( | ) |
Return 1 if OP is a valid immediate operand for mode MODE. The main use of this function is as a predicate in match_operand expressions in the machine description.
References targetm, and trunc_int_for_mode().
Referenced by nonmemory_operand().
int indirect_operand | ( | ) |
Return 1 if OP is a valid indirect memory reference with mode MODE; that is, a memory reference whose address is a general_operand.
References general_operand(), memory_operand(), offset, and reload_completed.
void init_recog | ( | void | ) |
References volatile_ok.
Referenced by combine_instructions(), cse_main(), final(), find_costs_and_classes(), instantiate_virtual_regs(), and reload().
void init_recog_no_volatile | ( | void | ) |
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().
int insn_invalid_p | ( | ) |
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(), check_asm_operands(), constrain_operands(), extract_insn(), recog(), reload_completed, reload_in_progress, rtvec_alloc(), SET, and validate_change().
Referenced by check_rtl(), process_insert_insn(), and verify_changes().
rtl_opt_pass* make_pass_peephole2 | ( | ) |
rtl_opt_pass* make_pass_split_after_reload | ( | ) |
rtl_opt_pass* make_pass_split_all_insns | ( | ) |
rtl_opt_pass* make_pass_split_before_regstack | ( | ) |
rtl_opt_pass* make_pass_split_before_sched2 | ( | ) |
rtl_opt_pass* make_pass_split_for_shorten_branches | ( | ) |
int memory_address_addr_space_p | ( | enum machine_mode | mode, |
rtx | addr, | ||
addr_space_t | as | ||
) |
Return 1 if ADDR is a valid memory address for mode MODE in address space AS.
References targetm.
Referenced by address_cost(), adjust_address_1(), change_address_1(), constrain_operands(), emit_move_insn(), expand_expr_real_1(), find_split_point(), gen_lowpart_if_possible(), general_operand(), get_address_cost(), maybe_memory_address_addr_space_p(), memory_address_addr_space(), multiplier_allowed_in_address_p(), offset_address(), offsettable_address_addr_space_p(), should_replace_address(), try_replace_in_use(), valid_mem_ref_p(), validize_mem(), and verify_changes().
int memory_operand | ( | ) |
Return 1 if OP is a valid memory reference with mode MODE, including a valid address. The main use of this function is as a predicate in match_operand expressions in the machine description.
References general_operand(), and reload_completed.
Referenced by asm_operand_ok(), find_reloads_address_1(), indirect_operand(), init_eliminable_invariants(), and setup_reg_equiv().
bool mode_dependent_address_p | ( | ) |
Return 1 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 targetm.
Referenced by combine_simplify_rtx(), convert_move(), gen_lowpart_for_combine(), make_extraction(), offsettable_address_addr_space_p(), simple_move_operand(), simplify_shift_const_1(), simplify_subreg(), simplify_truncation(), simplify_unary_operation_1(), and simplify_while_replacing().
int next_insn_tests_no_inequality | ( | ) |
Return 1 if the insn using CC0 set by INSN does not contain any ordered tests applied to the condition codes. EQ and NE tests do not count.
References inequality_comparisons_p(), and next_cc0_user().
int nonimmediate_operand | ( | ) |
Return 1 if OP is a general operand that is not an immediate operand.
References general_operand().
int nonmemory_operand | ( | ) |
Return 1 if OP is a register reference or immediate value of mode MODE.
References general_operand(), immediate_operand(), in_hard_reg_set_p(), and reload_completed.
int num_changes_pending | ( | void | ) |
Return number of changes made and not validated yet.
References num_changes.
Referenced by forward_propagate_asm(), regmove_backward_pass(), try_replace_reg(), and validate_simplify_insn().
int num_validated_changes | ( | void | ) |
Return the number of changes so far in the current group.
References num_changes.
Referenced by dead_or_predicable(), decompose_multiword_subregs(), invert_jump_1(), redirect_jump_1(), and resolve_reg_notes().
int offsettable_address_addr_space_p | ( | int | strictp, |
enum machine_mode | mode, | ||
rtx | y, | ||
addr_space_t | as | ||
) |
Return 1 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.c.
References find_constant_term_loc(), memory_address_addr_space_p(), mode_dependent_address_p(), plus_constant(), RTX_AUTOINC, strict_memory_address_addr_space_p(), and targetm.
Referenced by offsettable_memref_p(), and offsettable_nonstrict_memref_p().
int offsettable_memref_p | ( | ) |
Return 1 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 offsettable_address_addr_space_p().
Referenced by constrain_operands(), and find_reloads().
int offsettable_nonstrict_memref_p | ( | ) |
Similar, but don't require a strictly valid mem ref: consider pseudo-regs valid as index or base regs.
References offsettable_address_addr_space_p().
Referenced by asm_operand_ok(), constrain_operands(), find_reloads(), and process_alt_operands().
int ordered_comparison_operator | ( | ) |
Return 1 if this is an ordered comparison operator (not including ORDERED and UNORDERED).
|
static |
While scanning basic block BB, we found a match of length MATCH_LEN, starting at INSN. Perform the replacement, removing the old insns and replacing them with ATTEMPT. Returns the last insn emitted, or NULL if the replacement is rejected.
References active_insn_p(), add_reg_note(), can_nonlocal_goto(), can_throw_internal(), copy_reg_eh_region_note_backward(), delete_insn_chain(), edge_def::dest, emit_insn_after_setloc(), find_reg_note(), fixup_args_size_notes(), edge_def::flags, peep2_insn_data::insn, last, make_edge(), maybe_copy_prologue_epilogue_insn(), next_active_insn(), peep2_buf_position(), peep2_current, peep2_do_cleanup_cfg, peep2_do_rebuild_jump_labels, edge_def::probability, purge_dead_edges(), rtx_equal_p(), split_block(), edge_def::src, and basic_block_def::succs.
Referenced by peephole2_optimize().
|
static |
Wrap N to fit into the peep2_insn_data buffer.
Referenced by peep2_attempt(), peep2_fill_buffer(), peep2_find_free_register(), peep2_next_insn(), peep2_reg_dead_p(), peep2_regno_dead_p(), peep2_update_life(), and peephole2_optimize().
|
static |
Add INSN, which is in BB, at the end of the peep2 insn buffer if possible. Return true if we added it, false otherwise. The caller will try to match peepholes against the buffer if we return false; otherwise it will try to add more instructions to the buffer.
References df_simulate_one_insn_forwards(), peep2_insn_data::insn, peep2_insn_data::live_before, peep2_buf_position(), peep2_current, and peep2_current_count.
Referenced by peephole2_optimize().
rtx peep2_find_free_register | ( | int | from, |
int | to, | ||
const char * | class_str, | ||
enum machine_mode | mode, | ||
HARD_REG_SET * | reg_set | ||
) |
Try to find a hard register of mode MODE, matching the register class in CLASS_STR, which is available at the beginning of insn CURRENT_INSN and remains available until the end of LAST_INSN. LAST_INSN may be NULL_RTX, in which case the only condition is that the register must be available before CURRENT_INSN. Registers that already have bits set in REG_SET will not be considered. If an appropriate register is available, it will be returned and the corresponding bit(s) in REG_SET will be set; otherwise, NULL_RTX is returned.
References add_to_hard_reg_set(), df_regs_ever_live_p(), gen_rtx_REG(), global_regs, peep2_insn_data::insn, live, peep2_insn_data::live_before, peep2_buf_position(), peep2_current, reload_completed, and targetm.
rtx peep2_next_insn | ( | ) |
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 peep2_insn_data::insn, peep2_buf_position(), peep2_current, and peep2_current_count.
int peep2_reg_dead_p | ( | ) |
Similarly for a REG.
References peep2_insn_data::insn, peep2_insn_data::live_before, peep2_buf_position(), and peep2_current.
int peep2_regno_dead_p | ( | ) |
Return true if REGNO is dead before the Nth non-note insn after `current'.
References peep2_insn_data::insn, peep2_insn_data::live_before, peep2_buf_position(), and peep2_current.
|
static |
Forget all currently tracked instructions, only remember current LIVE regset.
References peep2_insn_data::insn, peep2_insn_data::live_before, peep2_current, and peep2_current_count.
Referenced by peephole2_optimize().
|
static |
After performing a replacement in basic block BB, fix up the life information in our buffer. LAST is the last of the insns that we emitted as a replacement. PREV is the insn before the start of the replacement. MATCH_LEN is the number of instructions that were matched, and which now need to be replaced in the buffer.
References df_insn_rescan(), df_simulate_one_insn_backwards(), peep2_insn_data::insn, last, live, peep2_insn_data::live_before, peep2_buf_position(), peep2_current, and peep2_current_count.
Referenced by peephole2_optimize().
|
static |
Perform the peephole2 optimization pass.
References bitmap_copy(), default_rtl_profile(), df_analyze(), DF_LR_RUN_DCE, df_note_add_problem(), df_set_flags(), df_simulate_initialize_forwards(), get_insns(), peep2_insn_data::insn, last, live, peep2_insn_data::live_before, next_insn(), peep2_attempt(), peep2_buf_position(), peep2_current, peep2_current_count, peep2_do_cleanup_cfg, peep2_do_rebuild_jump_labels, peep2_fill_buffer(), peep2_reinit_state(), peep2_update_life(), peephole2_insns(), rebuild_jump_labels(), reg_obstack, and rtl_profile_for_bb().
Referenced by rest_of_handle_peephole2().
int pmode_register_operand | ( | ) |
Return 1 for a register in Pmode; ignore the tested mode.
References register_operand().
int pop_operand | ( | ) |
Return 1 if OP is a valid operand that stands for popping a value of mode MODE off the stack. The main use of this function is as a predicate in match_operand expressions in the machine description.
void preprocess_constraints | ( | void | ) |
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 recog_data_d::alternative_enabled_p, operand_alternative::anything_ok, base_reg_class(), operand_alternative::cl, operand_alternative::constraint, recog_data_d::constraints, operand_alternative::decmem_ok, operand_alternative::earlyclobber, operand_alternative::incmem_ok, operand_alternative::is_address, operand_alternative::matched, operand_alternative::matches, operand_alternative::memory_ok, memset(), recog_data_d::n_alternatives, recog_data_d::n_operands, operand_alternative::nonoffmem_ok, operand_alternative::offmem_ok, recog_data, recog_op_alt, operand_alternative::reject, and skip_alternative().
Referenced by build_def_use(), check_asm_stack_operands(), copyprop_hardreg_forward_1(), get_reg_class(), implicit_clobber_conflict_p(), process_bb_node_lives(), sched_analyze_insn(), and subst_asm_stack_regs().
int push_operand | ( | ) |
Return 1 if OP is a valid operand that stands for pushing a value of mode MODE onto the stack. The main use of this function is as a predicate in match_operand expressions in the machine description.
Referenced by emit_move_change_mode(), emit_move_complex(), emit_move_insn(), emit_move_multi_word(), find_equiv_reg(), record_dead_and_set_regs_1(), record_last_set_info(), and resolve_simple_move().
bool reg_fits_class_p | ( | const_rtx | operand, |
reg_class_t | cl, | ||
int | offset, | ||
enum machine_mode | mode | ||
) |
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 in_hard_reg_set_p().
Referenced by constrain_operands(), find_reloads(), record_reg_classes(), and reload_cse_simplify_operands().
int register_operand | ( | ) |
Return 1 if OP is a register reference of mode MODE. If MODE is VOIDmode, accept a register in any mode. The main use of this function is as a predicate in match_operand expressions in the machine description.
References general_operand(), in_hard_reg_set_p(), lra_in_progress, and reload_completed.
Referenced by asm_operand_ok(), check_cond_move_block(), emit_move_complex(), expand_atomic_fetch_op(), expand_builtin(), find_split_point(), maybe_emit_compare_and_swap_exchange_loop(), noce_try_cmove(), and pmode_register_operand().
|
static |
References peephole2_optimize().
|
static |
References split_all_insns().
|
static |
References split_all_insns().
|
static |
References split_all_insns().
|
static |
References split_all_insns().
int scratch_operand | ( | ) |
Return 1 if OP should match a MATCH_SCRATCH, i.e., if it is a SCRATCH or a hard register.
References lra_in_progress.
|
static |
A subroutine of validate_replace_rtx_1 that tries to simplify the resulting rtx.
References insn_data, mode_dependent_address_p(), offset, insn_data_d::operand, simplify_gen_binary(), simplify_gen_unary(), simplify_subreg(), swap_commutative_operands_p(), swap_condition(), validate_change(), validate_unshare_change(), and word_mode.
Referenced by validate_replace_rtx_1().
void split_all_insns | ( | void | ) |
Split all insns in the function. If UPD_LIFE, update life info after.
References bitmap_clear(), bitmap_set_bit(), changed, default_rtl_profile(), delete_insn_and_edges(), find_many_sub_basic_blocks(), basic_block_def::index, reload_completed, rtl_profile_for_bb(), sbitmap_alloc(), sbitmap_free(), set_noop_p(), split_insn(), and verify_flow_info().
Referenced by rest_of_handle_split_after_reload(), rest_of_handle_split_all_insns(), rest_of_handle_split_before_regstack(), and rest_of_handle_split_before_sched2().
unsigned int split_all_insns_noflow | ( | void | ) |
Same as split_all_insns, but do not expect CFG to be available. Used by machine dependent reorg passes.
References delete_insn_and_edges(), get_insns(), reload_completed, set_noop_p(), and split_insn().
Referenced by split_all_insns(), and split_all_insns_noflow().
|
static |
Split single instruction. Helper function for split_all_insns and split_all_insns_noflow. Return last insn in the sequence if successful, or NULL if unsuccessful.
References cleanup_subreg_operands(), copy_rtx(), find_reg_equal_equiv_note(), first, last, reload_completed, rtx_equal_p(), set_unique_reg_note(), and try_split().
int store_data_bypass_p | ( | ) |
Common predicates for use with define_bypass.
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 reg_mentioned_p(), and SET.
bool validate_change | ( | ) |
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(), apply_replacement(), attempt_change(), canonicalize_insn(), combine_set_extension(), cond_exec_process_insns(), copyprop_hardreg_forward_1(), cse_change_cc_mode(), cse_insn(), cse_process_notes_1(), eliminate_regs_in_insn(), final_scan_insn(), find_comparisons_in_bb(), find_moveable_pseudos(), fixup_debug_insns(), fixup_match_2(), fold_rtx(), haifa_change_pattern(), implicit_clobber_conflict_p(), insn_invalid_p(), invert_exp_1(), maybe_select_cc_mode(), move2add_use_add2_insn(), move2add_use_add3_insn(), move_invariant_reg(), move_unallocated_pseudos(), optimize_reg_copy_3(), pre_insert_copy_insn(), redirect_exp_1(), regmove_backward_pass(), reload_combine_recognize_pattern(), reload_cse_move2add(), reload_cse_simplify_operands(), reload_cse_simplify_set(), replace_dest_with_reg_ok_p(), replace_oldest_value_reg(), replace_read(), replace_src_with_reg_ok_p(), replace_uses(), reset_debug_uses_in_loop(), resolve_clobber(), resolve_subreg_use(), restore_pattern(), simplify_while_replacing(), split_iv(), transform_ifelse(), try_apply_stack_adjustment(), try_auto_increment(), try_back_substitute_reg(), try_eliminate_compare(), try_replace_in_use(), try_replace_reg(), undo_all_replacements(), validate_canon_reg(), validate_simplify_insn(), and verify_changes().
|
static |
Validate a proposed change to OBJECT. LOC is the location in the rtl at which NEW_RTX will be placed. If OBJECT is zero, no validation is done, the change is simply made. Two types of objects are supported: If OBJECT is a MEM, memory_address_p will be called with the address and mode as parameters. If OBJECT is an INSN, CALL_INSN, or JUMP_INSN, the insn will be re-recognized with the change in place. IN_GROUP is nonzero if this is part of a group of changes that must be performed as a group. In that case, the changes will be stored. The function `apply_change_group' will validate and apply the changes. If IN_GROUP is zero, this is a single change. Try to recognize the insn or validate the memory reference with the change applied. If the result is not valid for the machine, suppress the change and return zero. Otherwise, perform the change and return 1.
References apply_change_group(), changes_allocated, change_t::loc, num_changes, change_t::object, change_t::old, change_t::old_code, rtx_equal_p(), and change_t::unshare.
Referenced by validate_change(), and validate_unshare_change().
int validate_replace_rtx | ( | ) |
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(), and validate_replace_rtx_1().
Referenced by copy_src_to_dest(), fill_slots_from_thread(), move_btr_def(), optimize_reg_copy_1(), regmove_backward_pass(), and update_equiv_regs().
|
static |
Replace every occurrence of FROM in X with TO. Mark each change with validate_change passing OBJECT.
References num_changes, rtx_equal_p(), SET, simplify_while_replacing(), and validate_unshare_change().
Referenced by validate_replace_rtx(), validate_replace_rtx_group(), validate_replace_rtx_part(), validate_replace_rtx_part_nosimplify(), validate_replace_rtx_subexp(), and validate_replace_src_1().
void validate_replace_rtx_group | ( | ) |
Try replacing every occurrence of FROM in INSN with TO. This also will replace in REG_EQUAL and REG_EQUIV notes.
References validate_replace_rtx_1().
Referenced by expand_var_during_unrolling(), optimize_reg_copy_3(), regmove_backward_pass(), and reload_as_needed().
int validate_replace_rtx_part | ( | ) |
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().
Referenced by substitute_reg_in_expr().
int validate_replace_rtx_subexp | ( | ) |
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().
|
static |
Referenced by validate_replace_src_group().
|
static |
void validate_replace_src_group | ( | ) |
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(), validate_replace_src_data::to, and validate_replace_src_1().
Referenced by try_replace_reg().
bool validate_simplify_insn | ( | ) |
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(), num_changes_pending(), rtx_equal_p(), SET, simplify_rtx(), and validate_change().
Referenced by simplify_changed_insns().
bool validate_unshare_change | ( | ) |
Wrapper for validate_change_1 without the UNSHARE argument defaulting UNSHARE to true.
References validate_change_1().
Referenced by canonicalize_change_group(), copyprop_hardreg_forward_1(), cprop_jump(), cse_insn(), decompose_multiword_subregs(), fold_rtx(), forward_propagate_asm(), reload_combine_recognize_pattern(), reload_cse_simplify_set(), simplify_while_replacing(), try_fwprop_subst(), and validate_replace_rtx_1().
int verify_changes | ( | ) |
Tentatively apply the changes numbered NUM and up. Return 1 if all changes are valid, zero otherwise.
References asm_noperands(), insn_invalid_p(), memory_address_addr_space_p(), num_changes, change_t::object, rtvec_alloc(), and validate_change().
Referenced by apply_change_group(), dead_or_predicable(), implicit_clobber_conflict_p(), reload_as_needed(), replace_dest_with_reg_ok_p(), replace_src_with_reg_ok_p(), and try_fwprop_subst().
|
static |
Referenced by compute_branch_probabilities(), and solve_flow_graph().
|
static |
Referenced by validate_change_1().
int epilogue_completed |
Nonzero after thread_prologue_and_epilogue_insns has run.
Referenced by cond_exec_find_if_block(), dead_or_predicable(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), redirect_jump(), rest_of_clean_state(), rest_of_handle_branch_target_load_optimize1(), rest_of_handle_branch_target_load_optimize2(), and thread_prologue_and_epilogue_insns().
|
static |
|
static |
int peep2_current_count |
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().
|
static |
Referenced by peep2_attempt(), and peephole2_optimize().
|
static |
Referenced by peep2_attempt(), and peephole2_optimize().
|
static |
struct recog_data_d recog_data |
Referenced by add_insn_allocno_copies(), build_def_use(), can_reload_into(), check_and_make_def_conflict(), check_and_make_def_use_conflict(), check_asm_stack_operands(), cleanup_subreg_operands(), commutative_constraint_p(), 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(), find_matches(), find_reloads(), find_reloads_subreg_address(), find_reloads_toplev(), get_asm_operands_in_out(), get_dup_num(), get_insn_template(), get_reg_class(), get_static_insn_data(), hide_operands(), instantiate_virtual_regs_in_insn(), ira_implicitly_set_insn_hard_regs(), 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_single_reg_class_operands(), record_operand_costs(), record_out_operands(), record_reg_classes(), regmove_backward_pass(), reload_cse_simplify_operands(), restore_operands(), scan_one_insn(), simple_move(), single_reg_class(), single_reg_operand_class(), subst_asm_stack_regs(), and union_match_dups().
struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS][MAX_RECOG_ALTERNATIVES] |
Contains a vector of operand_alternative structures for every operand. Set up by preprocess_constraints.
Referenced by build_def_use(), check_and_make_def_conflict(), check_asm_stack_operands(), copyprop_hardreg_forward_1(), get_reg_class(), hide_operands(), make_early_clobber_and_input_conflicts(), preprocess_constraints(), record_out_operands(), and subst_asm_stack_regs().
int reload_completed |
Nonzero after end of reload pass. Set to 1 or 0 by toplev.c. Controls the significance of (SUBREG (MEM)).
Referenced by active_insn_p(), add_branch_dependences(), apply_replacement(), asm_operand_ok(), can_move_insns_across(), can_replace_by(), cfg_layout_can_merge_blocks_p(), cfg_layout_finalize(), change_address_1(), check_asm_operands(), check_rtl(), choose_best_pseudo_reg(), cleanup_cfg(), compute_use_by_pseudos(), cond_exec_find_if_block(), cond_exec_process_insns(), create_log_links(), cselib_invalidate_regno(), cselib_process_insn(), deletable_insn_p(), deps_analyze_insn(), deps_start_bb(), df_exit_block_uses_collect(), df_get_eh_block_artificial_uses(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), df_get_regular_block_artificial_uses(), df_insn_delete(), df_lr_local_compute(), dump_new_block_header(), dump_reg_info(), emit_move_complex_parts(), emit_move_multi_word(), equal_different_set_p(), extend_deps_reg_info(), extract_constrain_insn_cached(), find_best_reg_for_expr(), find_if_header(), fixup_fallthru_exit_predecessor(), gate_handle_postreload(), gate_postreload(), gen_lowpart_general(), gen_rtx_REG(), general_operand(), haifa_sched_finish(), hash_rtx_cb(), indirect_operand(), init_alias_analysis(), init_deps(), insn_invalid_p(), lra(), mark_unavailable_hard_regs(), maybe_extend_reg_info_p(), memory_operand(), moveup_expr(), noce_emit_cmove(), noce_find_if_block(), nonmemory_operand(), old_insns_match_p(), operand_subword(), peep2_find_free_register(), prepare_operand(), put_TImodes(), queue_to_ready(), record_store(), register_operand(), reload(), rest_of_clean_state(), restore_pattern(), rtl_can_merge_blocks(), rtl_for_decl_location(), scan_insn(), sched_analyze_insn(), sched_analyze_reg(), sched_init(), sched_rgn_finish(), schedule_block(), schedule_ebbs_finish(), schedule_insn(), schedule_insns(), sel_region_finish(), simplify_subreg_regno(), sms_schedule(), split_all_insns(), split_all_insns_noflow(), split_insn(), try_crossjump_to_edge(), try_optimize_cfg(), try_redirect_by_replacing_jump(), verify_rtx_sharing(), and verify_target_availability().
int volatile_ok |
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.c and expmed.c (most of the time). This should be 1 if all valid insns need to be recognized, such as in reginfo.c and final.c and reload.c. init_recog and init_recog_no_volatile are responsible for setting this.
Referenced by emit_block_move_via_movmem(), general_operand(), init_recog(), init_recog_no_volatile(), and maybe_legitimize_operand().
int which_alternative |
On return from `constrain_operands', indicate which alternative was satisfied.
Referenced by build_def_use(), check_asm_operands(), check_asm_stack_operands(), constrain_operands(), constrain_operands_cached(), copyprop_hardreg_forward_1(), extract_constrain_insn_cached(), extract_insn(), find_matches(), get_insn_template(), get_reg_class(), hide_operands(), lra_set_insn_recog_data(), lra_update_insn_recog_data(), output_asm_name(), record_out_operands(), reload_cse_simplify_operands(), subst_asm_stack_regs(), and validate_insn_alternatives().