GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | operand_alternative |
struct | recog_data_d |
struct | insn_gen_fn |
struct | insn_operand_data |
struct | insn_data_d |
Typedefs | |
typedef int(* | insn_operand_predicate_fn )(rtx, enum machine_mode) |
typedef const char *(* | insn_output_fn )(rtx *, rtx) |
Enumerations | |
enum | op_type { OP_IN, OP_OUT, OP_INOUT } |
Variables | |
int | volatile_ok |
int | which_alternative |
struct recog_data_d | recog_data |
struct operand_alternative | recog_op_alt [MAX_RECOG_OPERANDS][MAX_RECOG_ALTERNATIVES] |
struct insn_data_d | insn_data [] |
int | peep2_current_count |
typedef int(* insn_operand_predicate_fn)(rtx, enum machine_mode) |
A table defined in insn-output.c that give information about each insn-code value.
enum op_type |
void add_clobbers | ( | rtx | , |
int | |||
) |
Referenced by insn_invalid_p(), and recog_for_combine().
int added_clobbers_hard_reg_p | ( | int | ) |
Referenced by can_assign_to_reg_without_clobbers_p(), and insn_invalid_p().
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().
int asm_operand_ok | ( | rtx | , |
const char * | , | ||
const char ** | |||
) |
void cancel_changes | ( | int | ) |
int check_asm_operands | ( | rtx | ) |
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 constrain_operands | ( | int | ) |
int constrain_operands_cached | ( | int | ) |
void extract_constrain_insn_cached | ( | rtx | ) |
void extract_insn | ( | rtx | ) |
void extract_insn_cached | ( | rtx | ) |
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().
void insn_extract | ( | rtx | ) |
Referenced by extract_insn(), lra_set_insn_recog_data(), and lra_update_insn_recog_data().
int insn_invalid_p | ( | rtx | , |
bool | |||
) |
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().
bool mode_dependent_address_p | ( | rtx | , |
addr_space_t | |||
) |
int next_insn_tests_no_inequality | ( | rtx | ) |
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 | ( | rtx | ) |
int offsettable_nonstrict_memref_p | ( | rtx | ) |
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 | ( | int | ) |
int peep2_reg_dead_p | ( | int | , |
rtx | |||
) |
int peep2_regno_dead_p | ( | int | , |
int | |||
) |
Referenced by peephole2_optimize().
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().
|
inlinestatic |
Referenced by advance_state_on_fence(), can_reload_into(), choose_ready(), debug_dependencies(), decompose_multiword_subregs(), dep_cost_1(), early_queue_to_ready(), eliminate_regs_in_insn(), elimination_costs_in_insn(), emit_add3_insn(), emit_inc(), emit_insn_if_valid_for_reload(), emit_move_list(), end_ifcvt_sequence(), extract_insn(), fill_slots_from_thread(), final_scan_insn(), gen_reload_chain_without_interm_reg_p(), get_expr_cost(), inc_for_reload(), insn_cost(), instantiate_virtual_regs_in_insn(), ira_emit(), lra_emit_add(), lra_set_insn_recog_data(), new_ready(), noce_emit_cmove(), noce_emit_move_insn(), noce_emit_store_flag(), noce_try_cmove_arith(), optimize_skip(), process_address(), process_use_exprs(), prune_ready_list(), reg_save_code(), reload_as_needed(), reset_sched_cycles_in_current_ebb(), scan_loop(), schedule_block(), schedule_insn(), setup_prohibited_mode_move_regs(), and swap_rtx_condition().
|
inlinestatic |
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 recog().
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().
|
inlinestatic |
Skip chars until the next ',' or the end of the string. This is useful to skip alternatives in a constraint string.
Referenced by constrain_operands(), find_reloads(), preprocess_constraints(), and record_reg_classes().
int strict_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, and check that each pseudo reg has the proper kind of hard reg.
References replacement::mode, and targetm.
Referenced by constrain_operands(), find_reloads_address(), find_reloads_subreg_address(), get_secondary_mem(), offsettable_address_addr_space_p(), operand_subword(), and reload().
Same as above, but do not simplify rtx afterwards.
References apply_change_group(), and validate_replace_rtx_1().
Referenced by substitute_reg_in_expr().
bool validate_simplify_insn | ( | rtx | insn | ) |
int verify_changes | ( | int | ) |
struct insn_data_d insn_data[] |
Referenced by check_and_process_move(), combine_reloads(), debug_reload_to_stream(), default_cstore_mode(), default_secondary_reload(), eliminate_regs_in_insn(), elimination_costs_in_insn(), emit_block_move_via_movmem(), expand_atomic_compare_and_swap(), expand_binop_directly(), expand_builtin_memcmp(), expand_builtin_strcmp(), expand_builtin_strncmp(), expand_copysign_absneg(), expand_mult_highpart(), expand_twoval_binop(), extract_insn(), find_reloads(), get_insn_template(), get_optab_extraction_insn(), get_static_insn_data(), 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(), push_secondary_reload(), reload_adjust_reg_for_icode(), scratch_reload_class(), set_storage_via_setmem(), simplify_while_replacing(), supportable_narrowing_operation(), supportable_widening_operation(), vect_build_slp_tree_1(), vect_pattern_recog_1(), and vectorizable_shift().
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().
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 volatile_ok |
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.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 |
Set by constrain_operands to the number of the alternative that matched.
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().