GCC Middle and Back End API Reference
|
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "obstack.h"
#include "errors.h"
#include "gensupport.h"
#include <math.h>
#include "fnmatch.h"
Data Structures | |
struct | ticker |
struct | unit_decl |
struct | bypass_decl |
struct | automaton_decl |
struct | excl_rel_decl |
struct | unit_pattern_rel_decl |
struct | reserv_decl |
struct | insn_reserv_decl |
struct | decl |
struct | unit_regexp |
struct | reserv_regexp |
struct | nothing_regexp |
struct | sequence_regexp |
struct | repeat_regexp |
struct | allof_regexp |
struct | oneof_regexp |
struct | regexp |
struct | description |
struct | unit_set_el |
struct | pattern_set_el |
struct | pattern_reserv |
class | state |
struct | arc |
struct | alt_state |
struct | ainsn |
struct | automaton |
struct | automata_list_el |
struct | state_ainsn_table |
struct | unit_usage |
Macros | |
#define | CHAR_BIT 8 |
#define | NO_MINIMIZATION_OPTION "-no-minimization" |
#define | TIME_OPTION "-time" |
#define | STATS_OPTION "-stats" |
#define | V_OPTION "-v" |
#define | W_OPTION "-w" |
#define | NDFA_OPTION "-ndfa" |
#define | COLLAPSE_OPTION "-collapse-ndfa" |
#define | NO_COMB_OPTION "-no-comb-vect" |
#define | PROGRESS_OPTION "-progress" |
#define | DECL_UNIT(d) |
#define | DECL_BYPASS(d) |
#define | DECL_AUTOMATON(d) |
#define | DECL_EXCL(d) |
#define | DECL_PRESENCE(d) |
#define | DECL_ABSENCE(d) |
#define | DECL_RESERV(d) |
#define | DECL_INSN_RESERV(d) |
#define | REGEXP_UNIT(r) |
#define | REGEXP_RESERV(r) |
#define | REGEXP_SEQUENCE(r) |
#define | REGEXP_REPEAT(r) |
#define | REGEXP_ALLOF(r) |
#define | REGEXP_ONEOF(r) |
#define | XCREATENODE(T) |
#define | XCREATENODEVEC(T, N) |
#define | XCREATENODEVAR(T, S) |
#define | XCOPYNODE(T, P) |
#define | XCOPYNODEVEC(T, P, N) |
#define | XCOPYNODEVAR(T, P, S) |
#define | NOTHING_NAME "nothing" |
#define | bitmap_set_bit(bitstring, bitno) |
#define | CLEAR_BIT(bitstring, bitno) |
#define | bitmap_bit_p(bitstring, bitno) |
#define | MAX_FLOATING_POINT_VALUE_FOR_AUTOMATON_BOUND 1.0E37 |
#define | CHIP_NAME "DFA_chip" |
#define | ADVANCE_CYCLE_VALUE_NAME "DFA__ADVANCE_CYCLE" |
#define | COLLAPSE_NDFA_VALUE_NAME "NDFA__COLLAPSE" |
#define | CPU_UNITS_QUERY_MACRO_NAME "CPU_UNITS_QUERY" |
#define | INTERNAL_MIN_ISSUE_DELAY_FUNC_NAME "internal_min_issue_delay" |
#define | STATE_TYPE_NAME "state_t" |
#define | INTERNAL_TRANSITION_FUNC_NAME "internal_state_transition" |
#define | INTERNAL_RESET_FUNC_NAME "internal_reset" |
#define | INTERNAL_DEAD_LOCK_FUNC_NAME "internal_state_dead_lock_p" |
#define | INTERNAL_INSN_LATENCY_FUNC_NAME "internal_insn_latency" |
#define | DFA_INSN_CODES_VARIABLE_NAME "dfa_insn_codes" |
#define | DFA_INSN_CODES_LENGTH_VARIABLE_NAME "dfa_insn_codes_length" |
#define | SIZE_FUNC_NAME "state_size" |
#define | TRANSITION_FUNC_NAME "state_transition" |
#define | MIN_ISSUE_DELAY_FUNC_NAME "min_issue_delay" |
#define | MIN_INSN_CONFLICT_DELAY_FUNC_NAME "min_insn_conflict_delay" |
#define | DEAD_LOCK_FUNC_NAME "state_dead_lock_p" |
#define | RESET_FUNC_NAME "state_reset" |
#define | INSN_LATENCY_FUNC_NAME "insn_latency" |
#define | PRINT_RESERVATION_FUNC_NAME "print_reservation" |
#define | GET_CPU_UNIT_CODE_FUNC_NAME "get_cpu_unit_code" |
#define | CPU_UNIT_RESERVATION_P_FUNC_NAME "cpu_unit_reservation_p" |
#define | INSN_HAS_DFA_RESERVATION_P_FUNC_NAME "insn_has_dfa_reservation_p" |
#define | DFA_CLEAN_INSN_CACHE_FUNC_NAME "dfa_clean_insn_cache" |
#define | DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME "dfa_clear_single_insn_cache" |
#define | DFA_START_FUNC_NAME "dfa_start" |
#define | DFA_FINISH_FUNC_NAME "dfa_finish" |
#define | STATE_NAME "state" |
#define | INSN_PARAMETER_NAME "insn" |
#define | INSN2_PARAMETER_NAME "insn2" |
#define | CHIP_PARAMETER_NAME "chip" |
#define | FILE_PARAMETER_NAME "f" |
#define | CPU_UNIT_NAME_PARAMETER_NAME "cpu_unit_name" |
#define | CPU_CODE_PARAMETER_NAME "cpu_unit_code" |
#define | INTERNAL_INSN_CODE_NAME "insn_code" |
#define | INTERNAL_INSN2_CODE_NAME "insn2_code" |
#define | TEMPORARY_VARIABLE_NAME "temp" |
#define | I_VARIABLE_NAME "i" |
#define | RESULT_VARIABLE_NAME "res" |
#define | INTERNAL_DFA_INSN_CODE_FUNC_NAME "internal_dfa_insn_code" |
#define | DFA_INSN_CODE_FUNC_NAME "dfa_insn_code" |
#define | NAME_CODE_STRUCT_NAME "name_code" |
#define | NAME_CODE_TABLE_NAME "name_code_table" |
#define | NAME_MEMBER_NAME "name" |
#define | CODE_MEMBER_NAME "code" |
#define | CMP_VARIABLE_NAME "cmp" |
#define | LOW_VARIABLE_NAME "l" |
#define | MIDDLE_VARIABLE_NAME "m" |
#define | HIGH_VARIABLE_NAME "h" |
#define | MAX_LINE_LENGTH 70 |
#define | STANDARD_OUTPUT_DESCRIPTION_FILE_SUFFIX ".dfa" |
Typedefs | |
typedef int | pos_t |
typedef unsigned HOST_WIDE_INT | set_el_t |
typedef set_el_t * | reserv_sets_t |
typedef const set_el_t * | const_reserv_sets_t |
typedef struct ticker | ticker_t |
typedef HOST_WIDE_INT | vect_el_t |
typedef struct unit_decl * | unit_decl_t |
typedef const struct unit_decl * | const_unit_decl_t |
typedef struct decl * | decl_t |
typedef const struct decl * | const_decl_t |
typedef struct regexp * | regexp_t |
typedef struct unit_set_el * | unit_set_el_t |
typedef struct pattern_set_el * | pattern_set_el_t |
typedef struct pattern_reserv * | pattern_reserv_t |
typedef struct alt_state * | alt_state_t |
typedef struct state * | state_t |
typedef const struct state * | const_state_t |
typedef struct arc * | arc_t |
typedef struct ainsn * | ainsn_t |
typedef struct automaton * | automaton_t |
typedef struct automata_list_el * | automata_list_el_t |
typedef const struct automata_list_el * | const_automata_list_el_t |
typedef struct state_ainsn_table * | state_ainsn_table_t |
typedef vec< vect_el_t > | vla_hwint_t |
typedef struct unit_usage * | unit_usage_t |
Enumerations | |
enum | decl_mode { dm_unit , dm_bypass , dm_automaton , dm_excl , dm_presence , dm_absence , dm_reserv , dm_insn_reserv } |
enum | regexp_mode { rm_unit , rm_reserv , rm_nothing , rm_sequence , rm_repeat , rm_allof , rm_oneof } |
#define ADVANCE_CYCLE_VALUE_NAME "DFA__ADVANCE_CYCLE" |
This is name of macro value which is code of pseudo_insns representing advancing cpu cycle and collapsing the NDFA. Its value is used as internal code unknown insn.
Referenced by output_insn_has_dfa_reservation_p(), output_internal_insn_code_evaluation(), output_min_issue_delay_func(), output_print_reservation_func(), output_tables(), and output_trans_func().
#define bitmap_bit_p | ( | bitstring, | |
bitno ) |
Test if bit number bitno in the bitstring is set. The macro is not side effect proof.
Referenced by update_list::add(), add_clobbers_to_eh_landing_pad(), add_conflict_from_region_landing_pads(), add_exit_phis_var(), add_graph_edge(), add_new_name_mapping(), add_partitioned_vars_to_ptset(), add_removable_extension(), sarif_artifact::add_role(), add_store_equivs(), addr_object_size(), adjust_cleared_regs(), all_positions_needed_p(), analyze_access_subtree(), analyze_all_variable_accesses(), assign_by_spills(), assign_hard_reg(), assign_spill_hard_regs(), back_propagate_equivalences(), bb_in_loop_p(), sbr_lazy_vector::bb_range_p(), bb_seen_p(), bbs_ok_for_cmove_arith(), eliminate_dom_walker::before_dom_children(), find_comparison_dom_walker::before_dom_children(), rewrite_dom_walker::before_dom_children(), rewrite_update_dom_walker::before_dom_children(), bitmap_find_leader(), bitmap_set_contains_value(), bitmap_set_subtract_values(), loop_distribution::break_alias_scc_partitions(), build_access_from_expr_1(), build_bitint_stmt_ssa_conflicts(), build_insn_chain(), build_store_vectors(), cached_can_duplicate_bb_p(), cached_make_edge(), calculate_equiv_gains(), calculate_livein_cands(), calculate_loop_reg_pressure(), call_may_clobber_ref_p_1(), can_decompose_p(), can_sm_ref_p(), cand_trans_fun(), range_def_chain::chain_import_p(), rt_bb_visited::check(), check_all_va_list_escapes(), check_argument_load(), check_for_plus_in_loops_1(), symtab_node::check_ifunc_callee_symtab_nodes(), check_va_list_escapes(), loop_distribution::classify_partition(), cleanup_control_flow_pre(), cleanup_empty_eh_merge_phis(), pair_fusion_bb_info::cleanup_tombstones(), coalesce_bitint(), coalesce_spill_slots(), collect_object_sizes_for(), color_pass(), combine_reload_insn(), combine_reloads(), compute_always_reached(), compute_antic(), compute_antic_aux(), compute_builtin_object_size(), compute_dependence_clique(), compute_path_counts(), compute_topo_order(), condense_visit(), consider_split(), control_parents_preserved_p(), convert_local_reference_op(), convert_nonlocal_reference_op(), copy_cfg_body(), copy_loops(), create_access(), create_caps(), create_coalesce_list_for_region(), create_loop_allocnos(), create_variable_info_for_1(), cgraph_node::create_version_clone(), cse_find_path(), cse_main(), dce_process_block(), dead_debug_global_replace_temp(), dead_debug_insert_temp(), dead_debug_reset_uses(), dead_or_predicable(), df_analyze(), df_compact_blocks(), df_create_unused_note(), df_exit_block_uses_collect(), df_get_bb_dirty(), df_get_call_refs(), df_install_ref_incremental(), df_install_refs(), df_live_verify_transfer_functions(), df_lr_verify_transfer_functions(), df_md_bb_local_compute_process_def(), df_md_local_compute(), df_note_bb_compute(), df_notes_rescan(), df_print_word_regset(), df_prune_to_subcfg(), df_rd_bb_local_compute_process_def(), df_reg_chain_unlink(), df_remove_dead_eq_notes(), df_set_dead_notes_for_mw(), df_set_unused_notes_for_mw(), df_whole_mw_reg_dead_p(), df_whole_mw_reg_unused_p(), df_worklist_propagate_backward(), df_worklist_propagate_forward(), discover_loop(), do_ds_constraint(), do_remat(), do_rpo_vn_1(), do_sd_constraint(), draw_cfg_edges(), draw_cfg_nodes_no_loops(), dse_classify_store(), dse_step2(), dse_step3(), dse_step5(), phi_analyzer::dump(), range_def_chain::dump(), dump_bitmap_file(), dump_components(), dump_replaceable_exprs(), duplicate_loop_body_to_header_edge(), eh_region_may_contain_throw(), eh_region_outermost(), elim_backward(), elim_create(), elim_forward(), elim_unvisited_predecessor(), eliminate_phi(), eliminate_dom_walker::eliminate_stmt(), eliminate_tail_call(), eliminate_temp_copies(), eliminate_unnecessary_stmts(), execute_sm(), execute_update_addresses_taken(), path_range_query::exit_dependency_p(), expand_gimple_basic_block(), expand_gimple_cond(), expand_loc(), expand_one_ssa_partition(), expand_one_var(), expand_used_vars(), ext_dce_process_sets(), ext_dce_process_uses(), fast_dce(), fill_always_executed_in_1(), equiv_chain::find(), find_avail_set(), find_bypass_set(), find_costs_and_classes(), find_dummy_reload(), equiv_oracle::find_equiv_dom(), find_equivalent_node(), find_indirect_cycles(), find_invariants_body(), find_many_sub_basic_blocks(), find_moveable_pseudos(), infer_range_manager::exit_range_head::find_ptr(), relation_chain_head::find_relation(), dom_oracle::find_relation_block(), dom_oracle::find_relation_dom(), find_reload_regno_insns(), find_replaceable_in_bb(), find_ssa_names_to_propagate(), find_tail_calls(), find_va_list_reference(), find_what_var_points_to(), finish_taskreg_scan(), fix_bb_placements(), ipa_icf::sem_item_optimizer::fixup_pt_set(), fold_marked_statements(), foll_in_subgraph(), generate_edge_moves(), generate_loops_for_partition(), get_access_for_expr(), get_bb_avail_insn(), sbr_lazy_vector::get_bb_range(), get_gimple_for_ssa_name(), get_loop_body_in_if_conv_order(), get_loop_hot_path(), ssa_lazy_cache::get_range(), get_reg_known_equiv_p(), get_tm_region_blocks(), gimple_call_copy_skip_args(), gimple_equal_p(), gimple_flow_call_edges_add(), gimple_infer_range::gimple_infer_range(), gimple_lower_bitint(), gimplify_omp_for(), equiv_oracle::has_equiv_p(), ssa_lazy_cache::has_range(), infer_range_manager::has_range_p(), hoist_code(), hoist_memory_references(), ifcombine_replace_cond(), improve_inheritance(), range_def_chain::in_chain_p(), independent_of_stmt_p(), inherit_in_ebb(), init_live_subregs(), init_noce_multiple_sets_info(), initialize_parameter_reductions(), initialize_uninitialized_regs(), insert_store(), instrument_decisions(), interesting_dest_for_shprep_1(), invariant_p(), inverted_rev_post_order_compute(), ipa_pta_execute(), ipa_tm_diagnose_transaction(), ipa_tm_note_irrevocable(), ipa_tm_propagate_irr(), ipa_tm_scan_irr_blocks(), ipa_tm_scan_irr_function(), ipa_tm_transform_calls(), ipa_tm_transform_calls_1(), ipa_tm_transform_transaction(), ira_former_scratch_operand_p(), ira_former_scratch_p(), ira_loop_edge_freq(), ira_reassign_conflict_allocnos(), ira_reuse_stack_slot(), gori_map::is_export_p(), gori_map::is_import_p(), phi_group::is_modifier_p(), is_new_name(), is_old_name(), is_proper_for_analysis(), is_used_p(), path_oracle::killing_def(), label_visit(), latch_dominating_def(), sarif_location_relationship::lazily_add_kind(), live_track_live_p(), live_track_process_def(), loe_visit_block(), lower_omp_regimplify_p(), lra_coalesce(), lra_constraints(), lra_push_insn_1(), lra_split_hard_reg_for(), make_regs_eqv(), mark_all_reaching_defs_necessary_1(), ipa_param_body_adjustments::mark_dead_statements(), mark_def_interesting(), mark_def_sites(), mark_dfs_back_edges(), mark_elimination(), mark_nonssa_use(), mark_operand_necessary(), mark_reachable_blocks(), mark_use_interesting(), marked_for_renaming(), marked_insn_p(), vect_optimize_slp_pass::materialize(), maybe_optimize_var(), maybe_rewrite_mem_ref_base(), maybe_skip_until(), mem_might_overlap_already_clobbered_arg_p(), merge_object_sizes(), move_spill_restore(), multiplier_allowed_in_address_p(), must_not_spill_p(), need_for_split_p(), neuter_worker_single(), noce_convert_multiple_sets(), oacc_entry_exit_ok_1(), oacc_entry_exit_single_gang(), object_sizes_set(), omp_copy_decl_2(), one_store_motion_pass(), operand_to_remat(), phi_analyzer::operator[](), outermost_indep_loop(), output_cycle_reservs(), param_change_prob(), partition_view_bitmap(), perform_var_substitution(), pg_collect_alias_ddrs(), pg_unmark_merged_alias_ddrs(), place_prologue_for_one_component(), plus_stmt_object_size(), sarif_artifact::populate_roles(), post_order_compute(), pre_delete(), pre_edge_insert(), pre_expr_DFS(), pre_expr_DFS(), pre_expr_reaches_here_p_work(), pred_blocks_visited_p(), ipa_param_body_adjustments::prepare_debug_expressions(), prepare_def_site_for(), prepare_names_to_update(), prescan_insns_for_dce(), process_bb(), process_bb_lives(), phi_analyzer::process_phi(), propagate_all_subaccesses(), propagate_allocno_info(), propagate_freq(), propagate_necessity(), propagate_rank(), propagate_unknowns(), uninit_analysis::prune_phi_opnds(), prune_unused_phi_nodes(), pseudo_prefix_title(), pt_solution_includes_1(), pt_solution_set_var(), push_allocno_to_stack(), push_reload(), dom_oracle::query(), path_oracle::query(), query_loop_dependence(), loop_distribution::rdg_build_partitions(), reachable_at_most_once(), ana::reachability< GraphTraits >::reachable_from_p(), dom_oracle::record(), equiv_oracle::record(), record_set(), ref_indep_loop_p(), ref_maybe_used_by_call_p_1(), region_contains_p(), infer_range_manager::register_all_uses(), dom_oracle::register_transitives(), regrename_analyze(), release_defs_bitset(), remap_gimple_stmt(), remove_inheritance_pseudos(), remove_path(), remove_reachable_equiv_notes(), remove_some_program_points_and_update_live_ranges(), remove_some_program_points_and_update_live_ranges(), remove_unreachable_eh_regions_worker(), remove_unreachable_handlers(), remove_unreachable_handlers_no_lp(), remove_unused_locals(), reorder_loops(), reset_subreg_promoted_p(), rev_post_order_and_mark_dfs_back_seme(), rewrite_debug_stmt_uses(), rewrite_expr_tree_parallel(), rewrite_update_phi_arguments(), rtl_flow_call_edges_add(), scan_rtx_reg(), scc_visit(), rtx_reuse_manager::seen_def_p(), set_allocno_somewhere_renamed_p(), set_parm_rtl(), set_uids_in_ptset(), set_union_with_increment(), should_hoist_expr_to_dom(), simplify_gimple_switch_label_vec(), pcom_worker::single_nonlooparound_use(), sm_seq_valid_bb(), solve_graph(), sort_and_splice_var_accesses(), spill_for(), spill_hard_reg_in_range(), spill_pseudos(), spill_pseudos(), split_function(), split_live_ranges_for_shrink_wrap(), split_part_set_ssa_name_p(), ssa_conflicts_test_p(), stack_var_conflict_p(), vect_optimize_slp_pass::start_choosing_layouts(), store_can_be_removed_p(), test_nonssa_use(), test_unit_reserv(), jump_threader::thread_around_empty_blocks(), jump_threader::thread_through_normal_block(), tm_memopt_compute_antic(), tm_memopt_compute_available(), tm_memopt_transform_blocks(), tm_region_init(), topo_visit(), ipa_icf::sem_item_optimizer::traverse_congruence_split(), tree_optimize_tail_calls_1(), tree_unroll_loops_completely_1(), tree_unswitch_single_loop(), try_apply_stack_adjustment(), pair_fusion_bb_info::try_fuse_pair(), try_peel_loop(), try_shrink_wrapping(), undistribute_bitref_for_vector(), undo_optional_reloads(), update_bad_spill_attribute(), update_bb_reg_pressure(), update_callee_keys(), fwd_jt_path_registry::update_cfg(), update_dominators_in_loop(), update_ebb_live_info(), update_equiv_regs(), use_pointer_for_field(), va_list_counter_struct_op(), va_list_ptr_read(), va_list_ptr_write(), validate_arglist(), value_dies_in_block_x(), vect_slp_check_for_roots(), vect_transform_slp_perm_load_1(), verify_live_on_entry(), verify_loop_structure(), verify_non_ssa_vars(), verify_sese(), verify_ssaname_freelists(), verify_use(), version_to_be_replaced_p(), visit_loadstore(), vt_find_locations(), and word_dce_process_block().
#define bitmap_set_bit | ( | bitstring, | |
bitno ) |
The page contains macros for work with bits strings. We could use standard gcc bitmap or sbitmap but it would result in difficulties of building canadian cross.
Set bit number bitno in the bit string. The macro is not side effect proof.
Referenced by add_bb_to_cluster(), add_candidate_1(), add_control_edge(), add_exit_phis(), add_forwarder_blocks(), add_graph_edge(), add_implicit_graph_edge(), add_iv_candidate_derived_from_uses(), pcom_worker::add_looparound_copies(), add_new_name_mapping(), equiv_oracle::add_partial_equiv(), add_pred_graph_edge(), infer_range_manager::add_range(), ipa_icf::sem_item::add_reference(), add_regs_to_insn_regno_info(), sarif_artifact::add_role(), add_ssa_edge(), add_stack_var_conflict(), add_store_equivs(), path_range_query::add_to_exit_dependencies(), add_to_partition_kill_list(), add_to_repl_tbl(), add_to_value(), analyze_function(), apply_clusters(), assign_by_spills(), assign_hard_reg(), assign_spill_hard_regs(), assign_temporarily(), avoid_type_punning_on_regs(), loop_distribution::bb_top_order_init(), bb_valid_for_noce_process_p(), bbs_ok_for_cmove_arith(), dom_opt_dom_walker::before_dom_children(), ipcp_modif_dom_walker::before_dom_children(), substitute_and_fold_dom_walker::before_dom_children(), bitmap_insert_into_set(), bitmap_set_range(), bitmap_set_subtract_expressions(), bitmap_value_insert_into_set(), bitmap_value_replace_in_set(), break_superblocks(), build_access_from_call_arg(), build_access_from_expr(), build_accesses_from_assign(), build_insn_chain(), build_pred_graph(), loop_distribution::build_rdg_partition_for_vertex(), build_store_vectors(), build_succ_graph(), cache_can_duplicate_bb_p(), cached_make_edge(), calculate_bb_reg_pressure(), calculate_equiv_gains(), calculate_gen_cands(), calculate_live_on_exit(), calculate_livein_cands(), cand_trans_fun(), change_loop(), check_dependency(), check_for_plus_in_loops_1(), check_forbidden_calls(), symtab_node::check_ifunc_callee_symtab_nodes(), check_reduction_path(), check_sibcall_argument_overlap(), check_va_list_escapes(), cleanup_control_expr_graph(), cleanup_control_flow_bb(), cleanup_control_flow_pre(), cleanup_empty_eh_merge_phis(), cleanup_tree_cfg_bb(), coalesce_bitint(), coalesce_with_default(), coalesced_allocno_conflict_p(), collect_object_sizes_for(), combine_and_move_insns(), compute_always_reached(), compute_antic(), compute_builtin_object_size(), compute_cprop_data(), compute_dependence_clique(), compute_dominance_frontiers(), hybrid_jt_simplifier::compute_exit_dependencies(), path_range_query::compute_exit_dependencies(), compute_idf(), compute_live_loop_exits(), compute_live_vars_visit(), compute_local_properties(), compute_local_properties(), compute_path_counts(), condense_visit(), control_parents_preserved_p(), convert_local_omp_clauses(), convert_nonlocal_omp_clauses(), create_block_for_threading(), create_coalesce_list_for_region(), create_expression_by_pieces(), create_insn_allocnos(), create_loop_allocnos(), create_new_chain(), create_variable_info_for_1(), cse_find_path(), cselib_expand_value_rtx_1(), curr_insn_transform(), dead_debug_add(), dead_debug_global_replace_temp(), dead_debug_insert_temp(), dead_debug_promote_uses(), dead_debug_reset_uses(), dead_or_predicable(), decompose_multiword_subregs(), delete_dead_or_redundant_assignment(), delete_dead_or_redundant_call(), deps_ok_for_redirect_from_bb_to_bb(), determine_dominators_for_sons(), determine_group_iv_cost_address(), determine_group_iv_cost_cond(), determine_group_iv_cost_generic(), determine_group_iv_costs(), df_analyze(), df_analyze_loop(), df_chain_create_bb(), df_compact_blocks(), 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_insn_rescan(), df_live_bb_local_compute(), df_live_set_all_dirty(), df_live_verify_transfer_functions(), df_lr_bb_local_compute(), df_lr_local_compute(), df_lr_verify_transfer_functions(), df_md_bb_local_compute_process_def(), df_md_simulate_artificial_defs_at_top(), df_md_simulate_one_insn(), df_mir_simulate_one_insn(), df_note_bb_compute(), df_notes_rescan(), df_rd_bb_local_compute_process_def(), df_rd_local_compute(), df_rd_simulate_artificial_defs_at_top(), df_rd_simulate_one_insn(), df_set_bb_dirty(), df_set_blocks(), df_set_unused_notes_for_mw(), df_simulate_finalize_backwards(), df_simulate_find_defs(), df_simulate_find_noclobber_defs(), df_simulate_find_uses(), df_simulate_initialize_backwards(), df_simulate_initialize_forwards(), df_simulate_uses(), df_word_lr_alloc(), df_word_lr_mark_ref(), df_worklist_dataflow(), df_worklist_propagate_backward(), df_worklist_propagate_forward(), dfs_broadcast_reachable_1(), dfs_find_deadend(), discover_loop(), discover_nonconstant_array_refs(), discover_nonconstant_array_refs_r(), disqualify_candidate(), do_complex_constraint(), ipa_icf::sem_item_optimizer::do_congruence_step_for_index(), do_ds_constraint(), do_invalidate(), do_pre_regular_insertion(), do_remat(), do_rpo_vn_1(), do_sd_constraint(), draw_cfg_edges(), draw_cfg_nodes_no_loops(), dse_classify_store(), dse_step1(), dse_step2(), dump_final_callee_vcg(), duplicate_loop_body_to_header_edge(), eh_region_outermost(), elim_backward(), elim_create(), elim_forward(), eliminate_dom_walker::eliminate_cleanup(), eliminate_dom_walker::eliminate_stmt(), eliminate_unnecessary_stmts(), equiv_oracle::equiv_set(), path_oracle::equiv_set(), estimate_loops(), estimate_loops_at_level(), execute_sm_exit(), execute_update_addresses_taken(), expand_call_inline(), expand_complex_comparison(), ext_dce_init(), ext_dce_process_sets(), ext_dce_process_uses(), ext_dce_try_optimize_insn(), fast_dce(), fill_always_executed_in(), find_always_executed_bbs(), find_call_stack_args(), find_conditions(), find_decomposable_shift_zext(), find_decomposable_subregs(), find_exits(), find_inv_vars_cb(), find_local_vars_to_propagate(), find_moveable_pseudos(), back_threader::find_paths_to_names(), find_pseudo_copy(), find_refs_for_sm(), find_same_succ_bb(), find_split_points(), find_tail_calls(), find_uses_to_rename_use(), find_vdef_in_loop(), fix_bb_live_info(), fix_bb_placements(), fix_loop_structure(), ipa_icf::sem_item_optimizer::fixup_pt_set(), fold_marked_statements(), form_reserv_sets_list(), gather_mem_refs_stmt(), gather_ssa_name_hash_map_from(), generate_summary(), get_live_on_other_edges(), get_loop_body_in_bfs_order(), get_loop_body_in_if_conv_order(), get_loop_hot_path(), get_nonnull_args(), get_range_strlen(), get_range_strlen_phi(), get_rank(), get_tm_region_blocks(), get_undefined_value_partitions(), gimple_ior_addresses_taken_1(), gimple_lower_bitint(), gimple_merge_blocks(), gimple_redirect_edge_and_branch(), gimplify_omp_for(), gimplify_size_expressions(), remove_unreachable::handle_early(), hardcfr_sibcall_search_block(), hardcfr_sibcall_search_preds(), hoist_code(), hoist_memory_references(), ifcombine_mark_ssa_name(), improve_allocation(), improve_inheritance(), inherit_in_ebb(), inherit_reload_reg(), init_alias_analysis(), init_live_reload_and_inheritance_pseudos(), init_live_subregs(), init_rename_info(), init_var_map(), initialize_uninitialized_regs(), initiate_excl_sets(), initiate_live_solver(), insert_into_preds_of_block(), insert_phi_nodes(), tree_loop_interchange::interchange_loops(), inverted_rev_post_order_compute(), ipa_reference_read_optimization_summary(), ipa_reference_write_optimization_summary(), ipa_tm_propagate_irr(), ipa_tm_scan_irr_blocks(), ipa_tm_transform_calls(), ira_create_allocno(), ira_reassign_conflict_allocnos(), ira_reassign_pseudos(), ira_register_new_scratch_op(), ira_sort_regnos_for_alter_reg(), tree_switch_conversion::bit_test_cluster::is_beneficial(), is_caller_ifunc_resolver(), iterate_fix_dominators(), iv_ca_set_cp(), path_oracle::killing_def(), label_visit(), sarif_location_relationship::lazily_add_kind(), live_track_add_partition(), loe_visit_block(), loop_inverted_rev_post_order_compute(), loop_rev_post_order_compute(), lra_push_insn_1(), lra_remat(), lra_split_hard_reg_for(), lra_undo_inheritance(), lto_output(), make_dependent_on_partition(), make_edges(), make_hard_regno_dead(), make_hard_regno_live(), make_live_on_entry(), make_reg_live(), malloc_candidate_p_1(), tree_loop_interchange::map_inductions_to_loop(), mark_basic_block_deleted(), mark_bb_seen(), mark_block_for_update(), mark_conflict(), mark_control_dependent_edges_necessary(), mark_def_sites(), mark_dfs_back_edges(), mark_elimination(), mark_for_renaming(), mark_insn(), mark_last_stmt_necessary(), mark_lhs_in_seq_for_dce(), mark_nonssa_use(), mark_operand_necessary(), mark_phi_for_rewrite(), mark_reachable_handlers(), mark_ref_regs(), mark_regno_dead(), mark_regno_live(), mark_regno_live(), mark_replaceable(), mark_stmt_necessary(), fwd_jt_path_registry::mark_threaded_blocks(), match_simplify_replacement(), vect_optimize_slp_pass::materialize(), gori_map::maybe_add_gori(), maybe_add_sra_candidate(), maybe_lower_iteration_bound(), maybe_optimize_var(), maybe_remove_writeonly_store(), maybe_skip_until(), back_threader::maybe_thread_block(), merge_pseudos(), ssa_lazy_cache::merge_range(), move_stmt(), multiplier_allowed_in_address_p(), nearest_common_dominator_of_uses(), noce_convert_multiple_sets(), note_eh_region_may_contain_throw(), oacc_do_neutering(), oacc_entry_exit_ok(), oacc_entry_exit_ok_1(), object_sizes_execute(), object_sizes_set(), dom_opt_dom_walker::optimize_stmt(), optimize_va_list_gpr_fpr_size(), partition_view_bitmap(), partition_view_init(), perform_var_substitution(), phiprop_insert_phi(), place_prologue_for_one_component(), populate_coalesce_list_for_outofssa(), populate_single_mode_bitmaps(), post_order_compute(), pre_edge_insert(), pre_expr_DFS(), predcom_tmp_var(), predict_paths_for_bb(), process_bb_lives(), process_invariant_for_inheritance(), phi_analyzer::process_phi(), process_regs_for_copy(), process_replaceable(), update_list::propagation_failed(), prune_clobbered_mems(), prune_expressions(), prune_insertions_deletions(), uninit_analysis::prune_phi_opnds(), prune_unused_phi_nodes(), pt_solution_set_var(), ana::reachability< GraphTraits >::reachability(), reachable_at_most_once(), equiv_oracle::record(), path_oracle::record(), record_important_candidates(), record_invariant(), record_last_mem_set_info_common(), record_loop_dependence(), record_modified(), record_reg_sets(), record_set(), infer_range_manager::register_all_uses(), range_def_chain::register_dependency(), equiv_oracle::register_equiv(), equiv_oracle::register_initial_def(), regstat_bb_compute_calls_crossed(), regstat_bb_compute_ri(), release_ssa_name_after_update_ssa(), remove_edge_and_dominated_blocks(), remove_forwarder_block(), remove_path(), remove_prop_source_from_use(), remove_reachable_equiv_notes(), remove_some_program_points_and_update_live_ranges(), remove_some_program_points_and_update_live_ranges(), remove_unnecessary_allocnos(), remove_unreachable_handlers_no_lp(), remove_unused_ivs(), remove_unused_locals(), replace_mult_candidate(), replace_one_candidate(), scc_copy_prop::replace_scc_by_value(), replace_uses_by(), rewrite_blocks(), scan_reads(), scan_sharing_clauses(), scan_stores(), scc_visit(), sese_build_liveouts_use(), sbr_lazy_vector::set_bb_range(), set_bb_regs(), control_dependences::set_control_dependence_map_bit(), set_def_block(), range_def_chain::set_import(), set_is_used(), set_iv(), set_livein_block(), dom_oracle::set_one_relation(), set_parm_default_def_partition(), set_position_unneeded(), ssa_lazy_cache::set_range(), gori_map::set_range_invariant(), set_ref_loaded_in_loop(), set_ref_stored_in_loop(), set_reg_known_equiv_p(), rtx_reuse_manager::set_seen_def(), set_uids_in_ptset(), set_union_with_increment(), set_unit_reserv(), set_usage_bits(), set_var_live_on_entry(), setup_live_pseudos_and_spill_after_risky_transforms(), setup_try_hard_regno_pseudos(), should_hoist_expr_to_dom(), simple_dce_from_worklist(), simplify_gimple_switch_label_vec(), simplify_loop_version(), simplify_operand_subreg(), sm_seq_valid_bb(), solve_add_graph_edge(), solve_graph(), sorted_array_from_bitmap_set(), spill_for(), spill_pseudos(), split_all_insns(), pcom_worker::split_data_refs_to_components(), split_function(), split_live_ranges_for_shrink_wrap(), split_reg(), spread_components(), ssa_conflicts_add_one(), ssa_conflicts_merge(), vect_optimize_slp_pass::start_choosing_layouts(), jump_threader::thread_across_edge(), jump_threader::thread_around_empty_blocks(), thread_prologue_and_epilogue_insns(), jump_threader::thread_through_normal_block(), tidy_after_forward_propagate_addr(), tm_memopt_accumulate_memops(), tm_memopt_transform_blocks(), tm_region_init(), tm_region_init_1(), topo_visit(), pair_fusion_bb_info::track_tombstone(), tree_if_conversion(), tree_loop_unroll_and_jam(), tree_unroll_loops_completely(), tree_unroll_loops_completely_1(), tree_unswitch_single_loop(), try_peel_loop(), try_shrink_wrapping(), undistribute_ops_list(), loop_cand::undo_simple_reduction(), unify_nodes(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), update_alias_info_with_stack_vars(), update_bad_spill_attribute(), update_caller_keys(), update_complex_assignment(), update_dominators_in_loop(), update_ebb_live_info(), update_live_info(), update_lives(), use_pointer_for_field(), va_list_ptr_read(), relation_oracle::valid_equivs(), value_dies_in_block_x(), vect_lower_load_permutations(), vect_slp_check_for_roots(), vect_slp_function(), vect_transform_slp_perm_load_1(), verify_loop_structure(), verify_non_ssa_vars(), verify_sese(), verify_ssa(), verify_ssaname_freelists(), verify_vssa(), visit_bb(), visit_conflict(), visit_op(), ssa_name_limit_t::visit_phi(), vt_find_locations(), and walk_aliased_vdefs_1().
#define CHAR_BIT 8 |
Pipeline hazard description translator. Copyright (C) 2000-2024 Free Software Foundation, Inc. Written by Vladimir Makarov <vmakarov@redhat.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
References: 1. The finite state automaton based pipeline hazard recognizer and instruction scheduler in GCC. V. Makarov. Proceedings of GCC summit, 2003. 2. Detecting pipeline structural hazards quickly. T. Proebsting, C. Fraser. Proceedings of ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 280--286, 1994. This article is a good start point to understand usage of finite state automata for pipeline hazard recognizers. But I'd recommend the 1st and 3rd article for more deep understanding. 3. Efficient Instruction Scheduling Using Finite State Automata: V. Bala and N. Rubin, Proceedings of MICRO-28. This is the best article about usage of finite state automata for pipeline hazard recognizers. The current implementation is described in the 1st article and it is different from the 3rd article in the following: 1. New operator `|' (alternative) is permitted in functional unit reservation which can be treated deterministically and non-deterministically. 2. Possibility of usage of nondeterministic automata too. 3. Possibility to query functional unit reservations for given automaton state. 4. Several constructions to describe impossible reservations (`exclusion_set', `presence_set', `final_presence_set', `absence_set', and `final_absence_set'). 5. No reverse automata are generated. Trace instruction scheduling requires this. It can be easily added in the future if we really need this. 6. Union of automaton states are not generated yet. It is planned to be implemented. Such feature is needed to make more accurate interlock insn scheduling to get state describing functional unit reservation in a joint CFG point.
This file code processes constructions of machine description file which describes automaton used for recognition of processor pipeline hazards by insn scheduler and can be used for other tasks (such as VLIW insn packing. The translator functions `gen_cpu_unit', `gen_query_cpu_unit', `gen_bypass', `gen_excl_set', `gen_presence_set', `gen_final_presence_set', `gen_absence_set', `gen_final_absence_set', `gen_automaton', `gen_automata_option', `gen_reserv', `gen_insn_reserv' are called from file `genattrtab.cc'. They transform RTL constructions describing automata in .md file into internal representation convenient for further processing. The translator major function `expand_automata' processes the description internal representation into finite state automaton. It can be divided on: o checking correctness of the automaton pipeline description (major function is `check_all_description'). o generating automaton (automata) from the description (major function is `make_automaton'). o optional transformation of nondeterministic finite state automata into deterministic ones if the alternative operator `|' is treated nondeterministically in the description (major function is NDFA_to_DFA). o optional minimization of the finite state automata by merging equivalent automaton states (major function is `minimize_DFA'). o forming tables (some as comb vectors) and attributes representing the automata (functions output_..._table). Function `write_automata' outputs the created finite state automaton as different tables and functions which works with the automata to inquire automaton state and to change its state. These function are used by gcc instruction scheduler and may be some other gcc code.
Referenced by add_vect(), automata_list_hash(), base_bitmap_view< T, Traits >::base_bitmap_view(), bitmap_get_aligned_chunk(), bitmap_set_aligned_chunk(), cache_presence(), calculate_crc(), check_absence_pattern_sets(), check_presence_pattern_sets(), compare_states_for_equiv(), const_rtx_hash_1(), const_with_all_bytes_same(), constant_byte_string(), strlen_pass::count_nonzero_bytes(), do_mpfr_remquo(), dump_generic_node(), fold_view_convert_expr(), fprint_whex(), wi::from_mpz(), get_excl_set(), wi::primitive_int_traits< T, signed_p >::get_precision(), gimple_fold_builtin_clear_padding(), gimple_fold_builtin_memset(), hash_table_mod1(), hash_table_mod2(), hwasan_increment_frame_tag(), initiate_states(), input_struct_function_base(), ira_setup_alts(), md_decimal_string(), wi::mul_internal(), native_encode_constructor(), native_encode_string(), output_cycle_reservs(), output_struct_function_base(), popcount_hwi(), vn_walk_cb_data::push_partial_def(), reserv_sets_hash_value(), set_unit_reserv(), simplify_builtin_call(), state_hash(), state_is_differed(), string_hash(), test_unit_reserv(), tree_add_const_value_attribute(), visit_nary_op(), and vn_reference_lookup_3().
#define CHIP_NAME "DFA_chip" |
The following is name of the structure which represents DFA(s) for PHR.
Referenced by output_chip_definitions(), output_cpu_unit_reservation_p(), output_dead_lock_func(), output_internal_dead_lock_func(), output_internal_min_issue_delay_func(), output_internal_reset_func(), output_internal_trans_func(), output_min_insn_conflict_delay_func(), output_min_issue_delay_func(), output_reset_func(), output_size_func(), and output_trans_func().
#define CHIP_PARAMETER_NAME "chip" |
#define CLEAR_BIT | ( | bitstring, | |
bitno ) |
#define CMP_VARIABLE_NAME "cmp" |
The following macro values are local variable names for function `get_cpu_unit_code'.
Referenced by output_get_cpu_unit_code_func().
#define CODE_MEMBER_NAME "code" |
Referenced by output_get_cpu_unit_code_func().
#define COLLAPSE_NDFA_VALUE_NAME "NDFA__COLLAPSE" |
Referenced by output_tables(), and output_trans_func().
#define COLLAPSE_OPTION "-collapse-ndfa" |
Referenced by gen_automata_option(), and parse_automata_opt().
#define CPU_CODE_PARAMETER_NAME "cpu_unit_code" |
Referenced by output_cpu_unit_reservation_p().
#define CPU_UNIT_NAME_PARAMETER_NAME "cpu_unit_name" |
Referenced by output_get_cpu_unit_code_func().
#define CPU_UNIT_RESERVATION_P_FUNC_NAME "cpu_unit_reservation_p" |
Referenced by output_cpu_unit_reservation_p().
#define CPU_UNITS_QUERY_MACRO_NAME "CPU_UNITS_QUERY" |
Name of the PHR interface macro.
Referenced by output_reserved_units_table(), and write_automata().
#define DEAD_LOCK_FUNC_NAME "state_dead_lock_p" |
Referenced by output_dead_lock_func().
#define DECL_ABSENCE | ( | d | ) |
Referenced by gen_presence_absence_set(), and process_decls().
#define DECL_AUTOMATON | ( | d | ) |
Referenced by automaton_decl_eq_p(), automaton_decl_hash(), check_automaton_usage(), create_automata(), find_automaton_decl(), gen_automaton(), and process_decls().
#define DECL_BYPASS | ( | d | ) |
Referenced by gen_bypass(), output_description(), output_max_insn_queue_index_def(), process_bypass(), process_bypass_1(), process_bypass_2(), and process_decls().
#define DECL_EXCL | ( | d | ) |
Referenced by gen_excl_set(), and process_decls().
#define DECL_INSN_RESERV | ( | d | ) |
Referenced by add_advance_cycle_insn_decl(), add_collapse_ndfa_insn_decl(), check_unit_distributions_to_automata(), create_ainsns(), create_composed_state(), evaluate_max_reserv_cycles(), find_arc(), find_insn_decl(), for_each_matching_insn(), form_arcs_marked_by_insn(), form_important_insn_automata_lists(), gen_insn_reserv(), insn_decl_eq_p(), insn_decl_hash(), NDFA_to_DFA(), output_dead_lock_vect(), output_default_latencies(), output_description(), output_insn_code_cases(), output_insn_has_dfa_reservation_p(), output_internal_insn_latency_func(), output_internal_maximal_insn_latency_func(), output_max_insn_queue_index_def(), output_min_issue_delay_table(), output_print_reservation_func(), output_tables(), process_bypass_2(), process_decls(), process_regexp_decls(), set_new_cycle_flags(), special_decl_p(), and transform_insn_regexps().
#define DECL_PRESENCE | ( | d | ) |
Referenced by gen_presence_absence_set(), and process_decls().
#define DECL_RESERV | ( | d | ) |
Referenced by check_loops_in_regexps(), check_usage(), decl_eq_p(), decl_hash(), gen_reserv(), loop_in_regexp(), output_description(), process_decls(), process_regexp(), and process_regexp_decls().
#define DECL_UNIT | ( | d | ) |
Macros to access members of unions. Use only them for access to union members of declarations and regexps.
Referenced by check_usage(), compare_max_occ_cycle_nums(), decl_eq_p(), decl_hash(), estimate_one_automaton_bound(), expand_automata(), find_decl(), gen_cpu_unit(), gen_query_cpu_unit(), initiate_excl_sets(), initiate_presence_absence_pattern_sets(), initiate_states(), output_automaton_units(), output_description(), process_decls(), process_excls(), process_presence_absence_names(), process_presence_absence_patterns(), process_regexp(), units_to_automata_distr(), and units_to_automata_heuristic_distr().
#define DFA_CLEAN_INSN_CACHE_FUNC_NAME "dfa_clean_insn_cache" |
Referenced by output_dfa_clean_insn_cache_func(), and output_dfa_start_func().
#define DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME "dfa_clear_single_insn_cache" |
Referenced by output_dfa_clean_insn_cache_func().
#define DFA_FINISH_FUNC_NAME "dfa_finish" |
Referenced by output_dfa_finish_func().
#define DFA_INSN_CODE_FUNC_NAME "dfa_insn_code" |
Name of function (attribute) to translate insn into internal insn code with caching.
Referenced by output_dfa_insn_code_func(), output_insn_has_dfa_reservation_p(), output_internal_insn_code_evaluation(), output_min_issue_delay_func(), output_print_reservation_func(), and output_trans_func().
#define DFA_INSN_CODES_LENGTH_VARIABLE_NAME "dfa_insn_codes_length" |
Name of length of cache of insn dfa codes.
Referenced by output_dfa_clean_insn_cache_func(), output_dfa_insn_code_func(), output_dfa_start_func(), and write_automata().
#define DFA_INSN_CODES_VARIABLE_NAME "dfa_insn_codes" |
Name of cache of insn dfa codes.
Referenced by output_dfa_clean_insn_cache_func(), output_dfa_finish_func(), output_dfa_insn_code_func(), output_dfa_start_func(), and write_automata().
#define DFA_START_FUNC_NAME "dfa_start" |
Referenced by output_dfa_start_func().
#define FILE_PARAMETER_NAME "f" |
Referenced by output_print_reservation_func().
#define GET_CPU_UNIT_CODE_FUNC_NAME "get_cpu_unit_code" |
Referenced by output_get_cpu_unit_code_func().
#define HIGH_VARIABLE_NAME "h" |
Referenced by output_get_cpu_unit_code_func().
#define I_VARIABLE_NAME "i" |
Referenced by output_dfa_clean_insn_cache_func().
#define INSN2_PARAMETER_NAME "insn2" |
#define INSN_HAS_DFA_RESERVATION_P_FUNC_NAME "insn_has_dfa_reservation_p" |
Referenced by output_insn_has_dfa_reservation_p().
#define INSN_LATENCY_FUNC_NAME "insn_latency" |
Referenced by output_insn_latency_func().
#define INSN_PARAMETER_NAME "insn" |
Referenced by output_dfa_clean_insn_cache_func(), output_dfa_insn_code_func(), output_insn_has_dfa_reservation_p(), output_insn_latency_func(), output_internal_insn_latency_func(), output_maximal_insn_latency_func(), output_min_insn_conflict_delay_func(), output_min_issue_delay_func(), output_print_reservation_func(), and output_trans_func().
#define INTERNAL_DEAD_LOCK_FUNC_NAME "internal_state_dead_lock_p" |
Referenced by output_dead_lock_func(), and output_internal_dead_lock_func().
#define INTERNAL_DFA_INSN_CODE_FUNC_NAME "internal_dfa_insn_code" |
Name of function (attribute) to translate insn into internal insn code.
Referenced by output_dfa_insn_code_func().
#define INTERNAL_INSN2_CODE_NAME "insn2_code" |
#define INTERNAL_INSN_CODE_NAME "insn_code" |
Names of the variables whose values are internal insn code of rtx insn.
Referenced by output_automata_list_min_issue_delay_code(), output_automata_list_transition_code(), output_dfa_insn_code_func(), output_insn_has_dfa_reservation_p(), output_insn_latency_func(), output_internal_insn_latency_func(), output_internal_maximal_insn_latency_func(), output_internal_min_issue_delay_func(), output_internal_trans_func(), output_maximal_insn_latency_func(), output_min_insn_conflict_delay_func(), output_min_issue_delay_func(), output_print_reservation_func(), and output_trans_func().
#define INTERNAL_INSN_LATENCY_FUNC_NAME "internal_insn_latency" |
Referenced by output_insn_latency_func(), and output_internal_insn_latency_func().
#define INTERNAL_MIN_ISSUE_DELAY_FUNC_NAME "internal_min_issue_delay" |
Names of an internal functions:
Referenced by output_automata_list_transition_code(), output_internal_min_issue_delay_func(), output_min_insn_conflict_delay_func(), and output_min_issue_delay_func().
#define INTERNAL_RESET_FUNC_NAME "internal_reset" |
Referenced by output_internal_reset_func(), output_min_insn_conflict_delay_func(), and output_reset_func().
#define INTERNAL_TRANSITION_FUNC_NAME "internal_state_transition" |
Referenced by output_internal_trans_func(), output_min_insn_conflict_delay_func(), and output_trans_func().
#define LOW_VARIABLE_NAME "l" |
Referenced by output_get_cpu_unit_code_func().
#define MAX_FLOATING_POINT_VALUE_FOR_AUTOMATON_BOUND 1.0E37 |
This page contains code for creating DFA(s) and calls functions building them.
The following value is used to prevent floating point overflow for estimating an automaton bound. The value should be less DBL_MAX on the host machine. We use here approximate minimum of maximal double floating point value required by ANSI C standard. It will work for non ANSI sun compiler too.
Referenced by estimate_one_automaton_bound().
#define MAX_LINE_LENGTH 70 |
Maximal length of line for pretty printing into description file.
Referenced by output_automaton_units(), and output_state_arcs().
#define MIDDLE_VARIABLE_NAME "m" |
Referenced by output_get_cpu_unit_code_func().
#define MIN_INSN_CONFLICT_DELAY_FUNC_NAME "min_insn_conflict_delay" |
Referenced by output_min_insn_conflict_delay_func().
#define MIN_ISSUE_DELAY_FUNC_NAME "min_issue_delay" |
Referenced by output_min_issue_delay_func().
#define NAME_CODE_STRUCT_NAME "name_code" |
The following macro value is name of struct containing unit name and unit code.
Referenced by output_get_cpu_unit_code_func().
#define NAME_CODE_TABLE_NAME "name_code_table" |
The following macro value is name of table of struct name_code.
Referenced by output_get_cpu_unit_code_func().
#define NAME_MEMBER_NAME "name" |
The following macro values are member names for struct name_code.
Referenced by output_get_cpu_unit_code_func().
#define NDFA_OPTION "-ndfa" |
Referenced by gen_automata_option(), and parse_automata_opt().
#define NO_COMB_OPTION "-no-comb-vect" |
Referenced by gen_automata_option().
#define NO_MINIMIZATION_OPTION "-no-minimization" |
Options with the following names can be set up in automata_option construction. Because the strings occur more one time we use the macros.
Referenced by gen_automata_option(), and parse_automata_opt().
#define NOTHING_NAME "nothing" |
Name in reservation to denote absence reservation.
Referenced by form_regexp(), gen_regexp_el(), output_cycle_reservs(), output_print_reservation_func(), and process_decls().
#define PRINT_RESERVATION_FUNC_NAME "print_reservation" |
Referenced by output_print_reservation_func().
#define PROGRESS_OPTION "-progress" |
Referenced by gen_automata_option(), and parse_automata_opt().
#define REGEXP_ALLOF | ( | r | ) |
#define REGEXP_ONEOF | ( | r | ) |
Referenced by check_regexp_units_distribution(), copy_insn_regexp(), form_regexp(), gen_regexp_oneof(), loop_in_regexp(), process_alts_for_forming_states(), process_regexp(), process_regexp_cycles(), regexp_transform_func(), store_alt_unit_usage(), transform_2(), and transform_3().
#define REGEXP_REPEAT | ( | r | ) |
Referenced by copy_insn_regexp(), form_regexp(), gen_regexp_repeat(), loop_in_regexp(), process_regexp(), process_regexp_cycles(), regexp_transform_func(), and transform_1().
#define REGEXP_RESERV | ( | r | ) |
Referenced by copy_insn_regexp(), form_regexp(), loop_in_regexp(), process_regexp(), and process_regexp_cycles().
#define REGEXP_SEQUENCE | ( | r | ) |
Referenced by check_regexp_units_distribution(), copy_insn_regexp(), form_regexp(), gen_regexp_sequence(), loop_in_regexp(), process_regexp(), process_regexp_cycles(), process_seq_for_forming_states(), regexp_transform_func(), transform_1(), transform_2(), and transform_3().
#define REGEXP_UNIT | ( | r | ) |
Referenced by form_regexp(), gen_regexp_el(), process_regexp(), process_regexp_cycles(), process_seq_for_forming_states(), and store_alt_unit_usage().
#define RESET_FUNC_NAME "state_reset" |
Referenced by output_reset_func().
#define RESULT_VARIABLE_NAME "res" |
Name of result variable in some functions.
Referenced by output_automata_list_min_issue_delay_code(), and output_internal_min_issue_delay_func().
#define SIZE_FUNC_NAME "state_size" |
Names of the PHR interface functions:
Referenced by output_size_func().
#define STANDARD_OUTPUT_DESCRIPTION_FILE_SUFFIX ".dfa" |
This page mainly contains top level functions of pipeline hazards description translator.
The following macro value is suffix of name of description file of pipeline hazards description translator.
Referenced by initiate_automaton_gen().
#define STATE_NAME "state" |
Names of parameters of the PHR interface functions.
Referenced by output_cpu_unit_reservation_p(), output_dead_lock_func(), output_min_insn_conflict_delay_func(), output_min_issue_delay_func(), output_reset_func(), and output_trans_func().
#define STATE_TYPE_NAME "state_t" |
This is external type of DFA(s) state.
Referenced by output_cpu_unit_reservation_p(), output_dead_lock_func(), output_min_insn_conflict_delay_func(), output_min_issue_delay_func(), output_reset_func(), and output_trans_func().
#define STATS_OPTION "-stats" |
Referenced by gen_automata_option(), and parse_automata_opt().
#define TEMPORARY_VARIABLE_NAME "temp" |
Names of temporary variables in some functions.
Referenced by output_automata_list_min_issue_delay_code(), output_automata_list_transition_code(), output_internal_min_issue_delay_func(), and output_internal_trans_func().
#define TIME_OPTION "-time" |
Referenced by gen_automata_option(), and parse_automata_opt().
#define TRANSITION_FUNC_NAME "state_transition" |
Referenced by output_trans_func().
#define V_OPTION "-v" |
Referenced by gen_automata_option(), and parse_automata_opt().
#define W_OPTION "-w" |
Referenced by gen_automata_option(), and parse_automata_opt().
#define XCOPYNODE | ( | T, | |
P ) |
Referenced by add_excls(), add_presence_absence(), and copy_insn_regexp().
Referenced by copy_insn_regexp().
#define XCREATENODE | ( | T | ) |
Referenced by add_advance_cycle_insn_decl(), add_arc(), add_collapse_ndfa_insn_decl(), create_ainsns(), create_automata(), create_state_ainsn_table(), form_reserv_sets_list(), gen_automaton(), gen_bypass(), gen_cpu_unit(), gen_insn_reserv(), gen_presence_absence_set(), gen_query_cpu_unit(), gen_regexp_el(), gen_regexp_repeat(), gen_reserv(), get_free_alt_state(), get_free_automata_list_el(), get_free_state(), process_excls(), process_presence_absence_names(), and process_regexp().
Referenced by expand_automata(), gen_excl_set(), gen_regexp_allof(), gen_regexp_oneof(), gen_regexp_sequence(), process_presence_absence_patterns(), transform_1(), transform_2(), and transform_3().
Referenced by cache_presence().
typedef struct alt_state* alt_state_t |
typedef struct automata_list_el* automata_list_el_t |
typedef struct automaton* automaton_t |
typedef const struct automata_list_el* const_automata_list_el_t |
typedef const struct decl* const_decl_t |
typedef const set_el_t* const_reserv_sets_t |
typedef const struct state* const_state_t |
typedef const struct unit_decl* const_unit_decl_t |
typedef struct pattern_reserv* pattern_reserv_t |
typedef struct pattern_set_el* pattern_set_el_t |
typedef int pos_t |
Positions in machine description file. Now they are not used. But they could be used in the future for better diagnostic messages.
typedef set_el_t* reserv_sets_t |
Reservations of function units are represented by value of the following type.
typedef unsigned HOST_WIDE_INT set_el_t |
The following is element of vector of current (and planned in the future) functional unit reservations.
typedef struct state_ainsn_table* state_ainsn_table_t |
typedef struct unit_decl* unit_decl_t |
The following typedefs are for brevity.
typedef struct unit_set_el* unit_set_el_t |
typedef struct unit_usage* unit_usage_t |
typedef HOST_WIDE_INT vect_el_t |
The following type describes elements of output vectors.
typedef vec<vect_el_t> vla_hwint_t |
Declare vector types for various data structures:
enum decl_mode |
enum regexp_mode |
|
static |
The following function returns current time in milliseconds since the moment when given ticker was created.
References ticker::incremented_off_time, and ticker::modified_creation_time.
Referenced by print_active_time().
|
static |
This function is called by function pass_states to add an achieved STATE.
References all_achieved_states.
Referenced by evaluate_equiv_classes().
|
static |
Create and record a decl for the special advance-cycle transition.
References advance_cycle_insn_decl, DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, description::insns_num, decl::mode, no_pos, NULL, decl::pos, and XCREATENODE.
Referenced by transform_insn_regexps().
The function adds arc from FROM_STATE to TO_STATE marked by AINSN, unless such an arc already exists.
References allocated_arcs_num, ainsn::arc_exists_p, find_arc(), first_free_arc, state::first_out_arc, arc::insn, arc::next_arc_marked_by_insn, arc::next_out_arc, NULL, state::num_out_arcs, arc::to_state, and XCREATENODE.
Referenced by create_composed_state(), make_automaton(), merge_states(), and NDFA_to_DFA().
|
static |
This function is called by function pass_states to add an achieved STATE.
References automaton_states.
Referenced by form_important_insn_automata_lists().
|
static |
Create and record a decl for the special collapse-NDFA transition.
References collapse_ndfa_insn_decl, DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, description::insns_num, decl::mode, no_pos, NULL, decl::pos, and XCREATENODE.
Referenced by transform_insn_regexps().
|
static |
The function adds each element from SOURCE_LIST to the exclusion list of the each element from DEST_LIST. Checking situation "unit excludes itself".
References unit_decl::automaton_name, error(), unit_decl::excl_list, unit_decl::name, unit_set_el::next_unit_set_el, NULL, unit_set_el::unit_decl, and XCOPYNODE.
Referenced by process_decls().
|
static |
The function adds each element from PATTERN_LIST to presence (if PRESENCE_P) or absence list of the each element from DEST_LIST. Checking situations "unit requires own absence", and "unit excludes and requires presence of ...", "unit requires absence and presence of ...", "units in (final) presence set belong to different automata", and "units in (final) absence set belong to different automata". Remember that we process absence sets only after all presence sets.
References unit_decl::absence_list, unit_decl::automaton_name, error(), unit_decl::excl_list, unit_decl::final_absence_list, unit_decl::final_presence_list, i, unit_decl::name, pattern_set_el::next_pattern_set_el, unit_set_el::next_unit_set_el, NULL, unit_decl::presence_list, unit_set_el::unit_decl, pattern_set_el::unit_decls, pattern_set_el::units_num, w_flag, warning(), and XCOPYNODE.
Referenced by process_decls().
|
static |
The function forms `state_reservs' for STATE.
References add_state_reservs(), state::component_states, alt_state::next_sorted_alt_state, NULL, state::reservs, alt_state::state, and state_reservs.
Referenced by add_state_reservs(), and output_state().
|
static |
The function is called by function pass_states. The function adds STATE to `output_states_vect'.
References output_states_vect.
Referenced by output_dead_lock_vect(), output_min_issue_delay_table(), output_reserved_units_table(), and output_trans_table().
|
static |
The following function adds vector VECT to table TAB as its line with number VECT_NUM.
References automaton::achieved_states_num, state_ainsn_table::automaton, state_ainsn_table::base_vect, CHAR_BIT, state_ainsn_table::check_vect, state_ainsn_table::comb_vect, state_ainsn_table::full_vect, gcc_assert, i, automaton::insn_equiv_classes_num, state_ainsn_table::max_base_vect_el_value, state_ainsn_table::max_comb_vect_el_value, state_ainsn_table::min_base_vect_el_value, state_ainsn_table::min_comb_vect_el_value, no_comb_flag, and undefined_vect_el_value.
Referenced by output_trans_table().
|
static |
The function adds element EL_VALUE to vector VECT for a table state x AINSN.
References insn_reserv_decl::equiv_class_num, gcc_assert, ainsn::insn_equiv_class_num, and undefined_vect_el_value.
Referenced by output_trans_table().
|
static |
Allocate new reservation set.
References els_in_reservs, and irp.
Referenced by form_reserv_sets_list(), form_reservs_matter(), get_free_state(), and initiate_states().
|
static |
The function compares unique numbers of alt states.
References state::unique_num.
Referenced by alt_states_eq(), and uniq_sort_alt_states().
|
static |
The function checks equality of alt state lists. Remember that the lists must be already sorted by the previous function.
References alt_state_cmp(), alt_state::next_sorted_alt_state, and NULL.
Referenced by form_ainsn_with_same_reservs().
|
static |
The following function adds AUTOMATON to the current list.
References current_automata_list, and get_free_automata_list_el().
Referenced by form_important_insn_automata_lists().
|
static |
Return nonzero value if the automata_lists are the same.
References automata_list_el::automaton, automata_list_el::next_automata_list_el, and NULL.
Referenced by initiate_automata_lists().
|
static |
The following function finishes forming the current list, inserts it into the table and returns it.
References automata_list_table, current_automata_list, free_automata_list(), and NULL.
Referenced by form_important_insn_automata_lists().
|
static |
Hash value of AUTOMATA_LIST.
References automata_list_el::automaton, automaton::automaton_order_num, CHAR_BIT, automata_list_el::next_automata_list_el, and NULL.
Referenced by initiate_automata_lists().
|
static |
The following function starts new automata list and makes it the current one.
References current_automata_list, and NULL.
Referenced by form_important_insn_automata_lists().
|
static |
The function tests automaton declarations on equality of their keys. The function is used by abstract data `hashtab'. The function returns 1 if the declarations have the same key, 0 otherwise.
References DECL_AUTOMATON, dm_automaton, gcc_assert, and decl::mode.
Referenced by initiate_automaton_decl_table().
|
static |
This page contains abstract data `table of automaton declarations'. Elements of the table is nodes representing automaton declarations. Key of the table elements is name of given automaton. Remember that automaton names have own space.
The function evaluates hash value of an automaton declaration. The function is used by abstract data `hashtab'. The function returns hash value (0..UINT_MAX) of given automaton declaration.
References DECL_AUTOMATON, dm_automaton, gcc_assert, decl::mode, and string_hash().
Referenced by initiate_automaton_decl_table().
|
static |
The function returns base name of given file name, i.e. pointer to first char after last `/' (or `\' for WIN32) in given file name, given file name itself if the directory name is absent. The returned string cannot be changed.
Referenced by diagnostic_output_format_init(), diagnostic_output_format_init_json_file(), diagnostic_output_format_init_sarif_file(), diagnostic_output_format_open_sarif_file(), and initiate_automaton_gen().
|
static |
The function builds one DFA AUTOMATON for fast pipeline hazards recognition after checking and simplifying IR of the description.
References automaton::corresponding_automaton_decl, count_states_and_arcs(), automaton::DFA_arcs_num, automaton::DFA_states_num, make_automaton(), automaton::minimal_DFA_arcs_num, automaton::minimal_DFA_states_num, minimize_DFA(), minimize_time, automaton_decl::name, automaton::NDFA_arcs_num, automaton::NDFA_states_num, NDFA_time, NDFA_to_DFA(), NDFA_to_DFA_time, no_minimization_flag, NULL, progress_flag, ticker_off(), and ticker_on().
Referenced by create_automata().
|
static |
This fills in the presence_signature[] member of STATE.
References CHAR_BIT, first_cycle_unit_presence(), i, state::presence_signature, description::query_units_num, units_array, description::units_num, and XCREATENODEVEC.
Referenced by evaluate_equiv_classes().
|
static |
The function checks that CHECKED_SET satisfies all absence pattern sets for units in ORIGINAL_SET. The function returns TRUE if it is ok.
References CHAR_BIT, els_in_cycle_reserv, i, pattern_reserv::next_pattern_reserv, NULL, pattern_reserv::reserv, unit_absence_set_table, unit_final_absence_set_table, and description::units_num.
Referenced by reserv_sets_are_intersected().
|
static |
The following function calls functions for checking all description.
References check_automaton_usage(), check_loops_in_regexps(), check_usage(), evaluate_max_reserv_cycles(), have_error, process_decls(), and process_regexp_decls().
Referenced by expand_automata().
|
static |
The following function checks existence at least one arc marked by each insn.
References automaton::ainsn_list, ainsn::arc_exists_p, automaton::collapse_ainsn, automaton::corresponding_automaton_decl, error(), description::first_automaton, ainsn::first_insn_with_same_reservs, ainsn::insn_reserv_decl, automaton_decl::name, insn_reserv_decl::name, ainsn::next_ainsn, automaton::next_automaton, ainsn::next_same_reservs_insn, NULL, w_flag, and warning().
Referenced by expand_automata().
|
static |
The following function checks that declared automaton is used. If the automaton is not used, the function fixes error/warning. The following function must be called only after `process_decls'.
References DECL_AUTOMATON, description::decls, description::decls_num, dm_automaton, error(), i, decl::mode, w_flag, and warning().
Referenced by check_all_description().
|
static |
The following function fixes errors "cycle in definition ...". The function uses function `loop_in_regexp' for that.
References curr_loop_pass_num, DECL_RESERV, description::decls, description::decls_num, dm_reserv, error(), gcc_assert, i, loop_in_regexp(), and decl::mode.
Referenced by check_all_description().
|
static |
The function checks that NAME does not contain quotes (`"').
References error().
Referenced by gen_automaton(), gen_cpu_unit(), gen_insn_reserv(), gen_query_cpu_unit(), and gen_reserv().
|
static |
The function checks that CHECKED_SET satisfies all presence pattern sets for units in ORIGINAL_SET. The function returns TRUE if it is ok.
References CHAR_BIT, els_in_cycle_reserv, i, pattern_reserv::next_pattern_reserv, NULL, pattern_reserv::reserv, unit_final_presence_set_table, unit_presence_set_table, and description::units_num.
Referenced by reserv_sets_are_intersected().
|
static |
The function processes given REGEXP to find units with the wrong distribution.
References annotation_message_reported_p, unit_decl::automaton_decl, cycle_alt_unit_usages, equal_alternatives_p(), error(), gcc_assert, gcc_unreachable, i, unit_decl::last_distribution_check_cycle, marked, regexp::mode, unit_decl::name, unit_usage::next, NULL, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_SEQUENCE, rm_allof, rm_nothing, rm_oneof, rm_sequence, rm_unit, store_alt_unit_usage(), unit_usage::unit_decl, unit_present_on_list_p(), and unit_usages.
Referenced by check_unit_distributions_to_automata().
|
static |
The function finds units which violates units to automata distribution rule. If the units exist, report about them.
References annotation_message_reported_p, automaton_decls, check_regexp_units_distribution(), DECL_INSN_RESERV, description::decls, description::decls_num, dm_automaton, dm_insn_reserv, i, decl::mode, and progress_flag.
Referenced by expand_automata().
|
static |
The following function checks that declared unit is used. If the unit is not used, the function fixes errors/warnings. The following function must be called only after `process_decls', `process_regexp_decls'.
References DECL_RESERV, DECL_UNIT, description::decls, description::decls_num, dm_reserv, dm_unit, error(), i, decl::mode, w_flag, and warning().
Referenced by check_all_description().
|
static |
The function clears equivalence numbers and alt_states in all insns which mark all out arcs of STATE.
References insn_reserv_decl::equiv_class_num, first_out_arc(), arc::insn, ainsn::insn_reserv_decl, next_out_arc(), and NULL.
Referenced by partition_equiv_class().
|
static |
The following function returns nonzero value if the best representation of the table is comb vector.
References state_ainsn_table::comb_vect, state_ainsn_table::full_vect, and no_comb_flag.
Referenced by output_automata_list_transition_code(), output_state_ainsn_table(), and output_statistics().
|
static |
The function compares unit declarations according to their maximal cycle in reservations.
References DECL_UNIT.
Referenced by units_to_automata_heuristic_distr().
|
static |
Compares two states pointed to by STATE_PTR_1 and STATE_PTR_2 and return -1, 0 or 1. This function can be used as predicate for qsort(). It requires the member presence_signature[] of both states be filled.
References CHAR_BIT, state::num_out_arcs, state::presence_signature, description::query_units_num, and si.
Referenced by evaluate_equiv_classes(), and init_equiv_class().
|
static |
Compare number of possible transitions from the states.
References out_state_arcs_num().
Referenced by output_trans_table().
The function copies pointers to equivalent states from vla FROM into vla TO.
Referenced by evaluate_equiv_classes().
This page contains code for transformation of original reservations described in .md file. The main goal of transformations is simplifying reservation and lifting up all `|' on the top of IR reservation representation.
The following function makes copy of IR representation of reservation. The function also substitutes all reservations defined by define_reservation by corresponding value during making the copy.
References copy_insn_regexp(), gcc_unreachable, i, regexp::mode, reserv_decl::regexp, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_REPEAT, REGEXP_RESERV, REGEXP_SEQUENCE, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, rm_unit, XCOPYNODE, and XCOPYNODEVAR.
Referenced by copy_insn_regexp(), transform_1(), transform_2(), transform_3(), and transform_insn_regexps().
|
static |
Copy IR structure (node).
References create_node().
Referenced by ipa_param_adjustments::adjust_decl(), build_adjusted_function_type(), ipa_param_body_adjustments::carry_over_param(), common_function_versions(), convert_to_integer_1(), copy_decl_no_change(), copy_tree_body_r(), copy_tree_r(), create_asan_shadow_var(), create_omp_child_function(), create_target_clone(), cgraph_node::create_version_clone_with_body(), cgraph_node::create_virtual_clone(), duplicate_one_attribute(), duplicate_thunk_for_node(), expand_call_mem_ref(), expand_expr_addr_expr_1(), expand_simple_operations(), fixup_child_record_type(), gimple_assign_rhs_to_tree(), gimplify_adjust_omp_clauses(), gimplify_modify_expr_rhs(), gimplify_omp_dispatch(), gimplify_omp_for(), gimplify_omp_loop(), ipa_merge_profiles(), ipa_tm_create_version(), lower_lastprivate_clauses(), merge_attributes(), symtab_node::noninterposable_alias(), optimize_compound_literals_in_ctor(), process_symver_attribute(), protected_set_expr_location_unshare(), remap_gimple_op_r(), remap_save_expr(), remap_type_1(), reorder_blocks_1(), replace_by_duplicate_decl(), save_inline_function_body(), simd_clone_create(), simplify_replace_tree(), split_complex_args(), store_expr(), strip_offset_1(), and task_copyfn_remap_type().
|
static |
The function counts states and arcs of AUTOMATON.
References curr_counted_arcs_num, curr_counted_states_num, incr_states_and_arcs_nums(), and pass_states().
Referenced by build_automaton().
|
static |
The functions creates automaton insns for each automata. Automaton insn is simply insn for given automaton which makes reservation only of units of the automaton.
References automaton::advance_ainsn, advance_cycle_insn_decl, automaton::ainsn_list, automaton::collapse_ainsn, collapse_ndfa_insn_decl, curr_ainsn, DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, i, ainsn::important_p, ainsn::insn_reserv_decl, decl::mode, ainsn::next_ainsn, NULL, and XCREATENODE.
Referenced by create_automata().
|
static |
Create nodes alt_state for all AUTOMATON insns.
References automaton::ainsn_list, ainsn::alt_states, curr_ainsn, ainsn::insn_reserv_decl, ainsn::next_ainsn, NULL, process_alts_for_forming_states(), ainsn::sorted_alt_states, special_decl_p(), and uniq_sort_alt_states().
Referenced by create_automata().
|
static |
The function creates DFA(s) for fast pipeline hazards recognition after checking and simplifying IR of the description.
References automata_num, automaton::automaton_order_num, build_automaton(), automaton::corresponding_automaton_decl, create_ainsns(), create_alt_states(), create_ticker(), DECL_AUTOMATON, description::decls, description::decls_num, dm_automaton, enumerate_states(), equiv_time, description::first_automaton, form_ainsn_with_same_reservs(), i, minimize_time, decl::mode, automaton_decl::name, NDFA_time, NDFA_to_DFA_time, automaton::next_automaton, NULL, progress_flag, set_insn_equiv_classes(), ticker_off(), ticker_on(), units_to_automata_distr(), units_to_automata_heuristic_distr(), and XCREATENODE.
Referenced by generate().
|
static |
The function creates composed state (see comments for IR) from ORIGINAL_STATE and list of arcs ARCS_MARKED_BY_INSN marked by the same insn. If the composed state is not in STATE_STACK yet, it is pushed into STATE_STACK.
References add_arc(), advance_cycle_insn_decl, insn_reserv_decl::arcs_marked_by_insn, state::automaton, collapse_flag, state::component_states, DECL_INSN_RESERV, first_out_arc(), free_state(), gcc_assert, get_free_alt_state(), get_free_state(), insert_state(), arc::insn, ainsn::insn_reserv_decl, state::it_was_placed_in_stack_for_DFA_forming, ndfa_flag, alt_state::next_alt_state, arc::next_arc_marked_by_insn, next_out_arc(), alt_state::next_sorted_alt_state, NULL, remove_arc(), alt_state::state, arc::to_state, and uniq_sort_alt_states().
Referenced by NDFA_to_DFA().
|
static |
|
static |
The following function creates new table for AUTOMATON.
References automaton::achieved_states_num, state_ainsn_table::automaton, state_ainsn_table::base_vect, state_ainsn_table::check_vect, state_ainsn_table::comb_vect, state_ainsn_table::full_vect, i, automaton::insn_equiv_classes_num, state_ainsn_table::max_base_vect_el_value, state_ainsn_table::max_comb_vect_el_value, state_ainsn_table::min_base_vect_el_value, state_ainsn_table::min_comb_vect_el_value, undefined_vect_el_value, and XCREATENODE.
Referenced by output_trans_table().
|
static |
The page contains abstract data `ticker'. This data is used to report time of different phases of building automata. It is possibly to write a description for which automata will be built during several minutes even on fast machine.
The following function creates ticker and makes it active.
References ticker::incremented_off_time, and ticker::modified_creation_time.
Referenced by create_automata(), expand_automata(), generate(), transform_insn_regexps(), and write_automata().
|
static |
The function tests declarations on equality of their keys. The function is used by abstract data 'hashtab'. The function returns 1 if the declarations have the same key, 0 otherwise.
References d1, d2, DECL_RESERV, DECL_UNIT, dm_reserv, dm_unit, and gcc_assert.
Referenced by initiate_decl_table().
|
static |
This page contains abstract data `table of declarations'. Elements of the table is nodes representing declarations (of units and reservations). Key of the table elements is names of given declarations.
The function evaluates hash value of a declaration. The function is used by abstract data `hashtab'. The function returns hash value (0..UINT_MAX) of given declaration.
References DECL_RESERV, DECL_UNIT, dm_reserv, dm_unit, gcc_assert, decl::mode, and string_hash().
Referenced by initiate_decl_table().
|
static |
The function deletes equiv_class_insn into cyclic list of equivalent ainsns.
References ainsn::next_equiv_class_insn.
Referenced by process_insn_equiv_class().
|
static |
The function enumerates all states of AUTOMATON.
References automaton::achieved_states_num, curr_state_order_num, pass_states(), and set_order_state_num().
Referenced by create_automata().
|
static |
The function returns true if reservations of alternatives ALT1 and ALT2 are equal after excluding reservations of units of EXCLUDED_AUTOMATON_DECL.
References unit_decl::automaton_decl, cycle_alt_unit_usages, i, unit_usage::next, NULL, and unit_usage::unit_decl.
Referenced by check_regexp_units_distribution().
|
static |
The function estimate size of the single DFA used by PHR (pipeline hazards recognizer).
References automata_num, DECL_UNIT, description::decls, description::decls_num, dm_unit, exp(), i, log(), MAX_FLOATING_POINT_VALUE_FOR_AUTOMATON_BOUND, and decl::mode.
Referenced by units_to_automata_heuristic_distr().
|
static |
The function finds equivalent states of AUTOMATON.
References add_achieved_state(), all_achieved_states, cache_presence(), compare_states_for_equiv(), copy_equiv_class(), i, init_equiv_class(), partition_equiv_class(), and pass_states().
Referenced by minimize_DFA().
|
static |
The following function is called only for correct program. The function defines max reservation of insns in cycles.
References DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, i, description::max_insn_reserv_cycles, decl::mode, and process_regexp_cycles().
Referenced by check_all_description().
|
static |
The following is top level function to generate automat(a,on) for fast recognition of pipeline hazards.
References all_time, check_all_description(), check_automata_insn_issues(), check_time, check_unit_distributions_to_automata(), create_ticker(), DECL_UNIT, decls, description::decls, description::decls_num, dm_unit, form_important_insn_automata_lists(), generate(), generation_time, have_error, i, decl::mode, description::normal_decls_num, progress_flag, description::query_units_num, ticker_off(), transform_insn_regexps(), and XCREATENODEVAR.
Referenced by main().
|
static |
The function returns suffix of given file name. The returned string cannot be changed.
References NULL.
Referenced by initiate_automaton_gen().
The functions returns arc with given characteristics (or NULL if the arc does not exist).
References collapse_flag, collapse_ndfa_insn_decl, DECL_INSN_RESERV, first_out_arc(), arc::insn, ainsn::insn_reserv_decl, next_out_arc(), NULL, and arc::to_state.
Referenced by add_arc().
|
static |
The function searches for automaton declaration in the table with the same key as node representing name of the automaton declaration. The function returns node found in the table, NULL if such node does not exist in the table.
References automaton_decl_table, DECL_AUTOMATON, dm_automaton, decl::mode, and work_automaton_decl.
Referenced by process_decls().
|
static |
The function searches for declaration in the table with the same key as node representing name of the declaration. The function returns node found in the table, NULL if such node does not exist in the table.
References decl_table, DECL_UNIT, dm_unit, decl::mode, and work_decl.
Referenced by process_decls(), process_excls(), process_presence_absence_names(), process_presence_absence_patterns(), and process_regexp().
|
static |
The function searches for insn reservation declaration in the table with the same key as node representing name of the insn reservation declaration. The function returns node found in the table, NULL if such node does not exist in the table.
References DECL_INSN_RESERV, dm_insn_reserv, insn_decl_table, decl::mode, and work_insn_decl.
Referenced by for_each_matching_insn().
|
static |
Finishing work with the abstract data.
Referenced by finish_states().
|
static |
Finishing work with the abstract data.
Referenced by write_automata().
|
static |
Finishing work with the abstract data.
References automata_list_table.
Referenced by write_automata().
|
static |
The function deletes the automaton declaration table. Only call of function `initiate_automaton_decl_table' is possible immediately after this function call.
References automaton_decl_table.
Referenced by write_automata().
|
static |
The function deletes the declaration table. Only call of function `initiate_declaration_table' is possible immediately after this function call.
References decl_table.
Referenced by write_automata().
|
static |
This recursive function finishes forming ALT_STATE of AUTOMATON and inserts alt_state into the table.
References free_state(), insert_state(), and alt_state::state.
Referenced by process_alts_for_forming_states().
|
static |
The function deletes the insn declaration table. Only call of function `initiate_insn_decl_table' is possible immediately after this function call.
References insn_decl_table.
Referenced by write_automata().
|
static |
The function frees memory allocated for last formed string representation of regexp.
References irp.
Referenced by output_print_reservation_func(), and output_regexp().
|
static |
Finishing work with the abstract data.
References finish_alt_states(), first_free_state, free(), NULL, state_table, and units_array.
Referenced by write_automata().
|
static |
The following function returns TRUE if STATE reserves the unit with UNIT_NUM on the first cycle.
References state::component_states, alt_state::next_sorted_alt_state, NULL, state::reservs, alt_state::state, and test_unit_reserv().
Referenced by cache_presence(), and output_reserved_units_table().
|
static |
The function returns the first arc starting from STATE.
References state::first_out_arc.
Referenced by clear_arc_insns_equiv_num(), create_composed_state(), find_arc(), form_arcs_marked_by_insn(), form_important_insn_automata_lists(), incr_states_and_arcs_nums(), merge_states(), out_state_arcs_num(), output_dead_lock_vect(), output_min_issue_delay_table(), output_state_arcs(), output_trans_table(), pass_state_graph(), process_state_for_insn_equiv_partition(), set_new_cycle_flags(), set_out_arc_insns_equiv_num(), and state_is_differed().
|
static |
BYPASS is a define_bypass decl that includes glob pattern PATTERN. Call FN (BYPASS, INSN, DATA) for each matching instruction INSN.
References DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, error(), find_insn_decl(), i, and insn_reserv_decl::name.
Referenced by process_bypass(), and process_bypass_1().
|
static |
The page contains major code for building DFA(s) for fast pipeline hazards recognition.
The function forms list of ainsns of AUTOMATON with the same reservation.
References automaton::ainsn_list, alt_states_eq(), curr_ainsn, ainsn::first_insn_with_same_reservs, i, ainsn::insn_reserv_decl, ainsn::next_ainsn, ainsn::next_same_reservs_insn, NULL, ainsn::sorted_alt_states, and special_decl_p().
Referenced by create_automata().
|
static |
Form lists of all arcs of STATE marked by the same ainsn.
References insn_reserv_decl::arcs_marked_by_insn, DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, first_out_arc(), gcc_assert, i, arc::insn, ainsn::insn_reserv_decl, decl::mode, arc::next_arc_marked_by_insn, next_out_arc(), and NULL.
Referenced by NDFA_to_DFA().
|
static |
The following function forms list of important automata (whose states may be changed after the insn issue) for each insn.
References add_automaton_state(), automaton::ainsn_list, automata_list_add(), automata_list_finish(), automata_list_start(), automaton_states, DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, description::first_automaton, ainsn::first_insn_with_same_reservs, first_out_arc(), gcc_assert, i, ainsn::important_p, arc::insn, ainsn::insn_reserv_decl, decl::mode, ainsn::next_ainsn, automaton::next_automaton, next_out_arc(), ainsn::next_same_reservs_insn, NULL, pass_states(), and arc::to_state.
Referenced by expand_automata().
|
static |
This page contains code for forming string representation of regexp. The representation is formed on IR obstack. So you should not work with IR obstack between regexp_representation and finish_regexp_representation calls.
This recursive function forms string representation of regexp (without trailing '\0').
References form_regexp(), gcc_unreachable, i, irp, regexp::mode, insn_reserv_decl::name, NOTHING_NAME, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_REPEAT, REGEXP_RESERV, REGEXP_SEQUENCE, REGEXP_UNIT, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
Referenced by form_regexp(), and regexp_representation().
|
static |
The following function forms list of reservation sets for given PATTERN_LIST.
References alloc_empty_reserv_sets(), bitmap_set_bit, i, pattern_reserv::next_pattern_reserv, NULL, pattern_reserv::reserv, and XCREATENODE.
Referenced by initiate_presence_absence_pattern_sets().
|
static |
Forming unit reservations which can affect creating the automaton states achieved from a given state. It permits to build smaller automata in many cases. We would have the same automata after the minimization without such optimization, but the automaton right after the building could be huge. So in other words, usage of reservs_matter means some minimization during building the automaton.
References alloc_empty_reserv_sets(), automaton::corresponding_automaton_decl, unit_decl::in_set_p, max_cycles_num, unit_decl::min_occ_cycle_num, unit_decl::query_p, set_unit_reserv(), units_array, and description::units_num.
Referenced by make_automaton().
|
static |
The function frees node ALT_STATE.
References first_free_alt_state, alt_state::next_alt_state, and NULL.
Referenced by free_alt_states().
|
static |
The function frees list started with node ALT_STATE_LIST.
References free_alt_state(), alt_state::next_alt_state, and NULL.
Referenced by free_state().
|
static |
The function frees node ARC.
References first_free_arc, and arc::next_out_arc.
Referenced by merge_states(), and remove_arc().
|
static |
The function frees list AUTOMATA_LIST.
References free_automata_list_el(), automata_list_el::next_automata_list_el, and NULL.
Referenced by automata_list_finish().
|
static |
The function frees node AUTOMATA_LIST_EL.
References first_free_automata_list_el, automata_list_el::next_automata_list_el, and NULL.
Referenced by free_automata_list().
|
static |
The function frees node STATE.
References state::component_states, first_free_state, free_alt_states(), and state::next_equiv_class_state.
Referenced by create_composed_state(), finish_forming_alt_state(), state_shift(), and states_union().
|
static |
Process an ABSENCE_SET. This gives information about a cpu unit reservation requirements. We fill a struct unit_pattern_rel_decl (absence) with information used later by `expand_automata'.
References gen_presence_absence_set().
Referenced by main().
|
static |
Process an AUTOMATA_OPTION. This gives information how to generate finite state automaton used for recognizing pipeline hazards.
References collapse_flag, COLLAPSE_OPTION, md_rtx_info::def, fatal_at(), GET_CODE, GET_RTX_NAME, md_rtx_info::loc, ndfa_flag, NDFA_OPTION, no_comb_flag, NO_COMB_OPTION, no_minimization_flag, NO_MINIMIZATION_OPTION, option(), progress_flag, PROGRESS_OPTION, stats_flag, STATS_OPTION, time_flag, TIME_OPTION, v_flag, V_OPTION, w_flag, W_OPTION, and XSTR.
Referenced by main().
|
static |
Process a DEFINE_AUTOMATON. This gives information about a finite state automaton used for recognizing pipeline hazards. We fill a struct automaton_decl with information used later by `expand_automata'.
References check_name(), DECL_AUTOMATON, decls, md_rtx_info::def, dm_automaton, fatal_at(), GET_CODE, GET_RTX_NAME, get_str_vect(), i, md_rtx_info::loc, decl::mode, NULL, decl::pos, XCREATENODE, and XSTR.
Referenced by main().
|
static |
Process a DEFINE_BYPASS. This gives information about a unit contained in the CPU. We fill in a struct bypass_decl with information used later by `expand_automata'.
References DECL_BYPASS, decls, md_rtx_info::def, dm_bypass, fatal_at(), GET_CODE, GET_RTX_NAME, get_str_vect(), i, md_rtx_info::loc, decl::mode, NULL, decl::pos, XCREATENODE, XINT, and XSTR.
Referenced by main().
|
static |
Process a DEFINE_CPU_UNIT. This gives information about a unit contained in CPU. We fill a struct unit_decl with information used later by `expand_automata'.
References check_name(), DECL_UNIT, decls, md_rtx_info::def, dm_unit, fatal_at(), GET_CODE, GET_RTX_NAME, get_str_vect(), i, md_rtx_info::loc, decl::mode, NULL, decl::pos, XCREATENODE, and XSTR.
Referenced by main().
|
static |
Process an EXCLUSION_SET. This gives information about a cpu unit conflicts. We fill a struct excl_rel_decl (excl) with information used later by `expand_automata'.
References DECL_EXCL, decls, md_rtx_info::def, dm_excl, fatal_at(), GET_CODE, GET_RTX_NAME, get_str_vect(), i, md_rtx_info::loc, decl::mode, NULL, decl::pos, XCREATENODEVAR, and XSTR.
Referenced by main().
|
static |
Process a FINAL_ABSENCE_SET. This gives information about a cpu unit reservation requirements. We fill a struct unit_pattern_rel_decl (absence) with information used later by `expand_automata'.
References gen_presence_absence_set().
Referenced by main().
|
static |
Process a FINAL_PRESENCE_SET. This gives information about a cpu unit reservation requirements. We fill a struct unit_pattern_rel_decl (presence) with information used later by `expand_automata'.
References gen_presence_absence_set().
Referenced by main().
|
static |
Process a DEFINE_INSN_RESERVATION. This gives information about the reservation of cpu units by an insn. We fill a struct insn_reserv_decl with information used later by `expand_automata'.
References check_name(), DECL_INSN_RESERV, decls, md_rtx_info::def, dm_insn_reserv, gen_regexp(), decl::mode, decl::pos, XCREATENODE, XEXP, XINT, and XSTR.
Referenced by main().
|
static |
Process a PRESENCE_SET, a FINAL_PRESENCE_SET, an ABSENCE_SET, FINAL_ABSENCE_SET (it is depended on PRESENCE_P and FINAL_P). This gives information about a cpu unit reservation requirements. We fill a struct unit_pattern_rel_decl with information used later by `expand_automata'.
References DECL_ABSENCE, DECL_PRESENCE, decls, md_rtx_info::def, dm_absence, dm_presence, fatal_at(), gcc_assert, GET_CODE, GET_RTX_NAME, get_str_vect(), i, irp, md_rtx_info::loc, decl::mode, NULL, decl::pos, XCREATENODE, and XSTR.
Referenced by gen_absence_set(), gen_final_absence_set(), gen_final_presence_set(), and gen_presence_set().
|
static |
Process a PRESENCE_SET. This gives information about a cpu unit reservation requirements. We fill a struct unit_pattern_rel_decl (presence) with information used later by `expand_automata'.
References gen_presence_absence_set().
Referenced by main().
|
static |
Process a DEFINE_QUERY_CPU_UNIT. This gives information about a unit contained in CPU. We fill a struct unit_decl with information used later by `expand_automata'.
References check_name(), DECL_UNIT, decls, md_rtx_info::def, dm_unit, fatal_at(), GET_CODE, GET_RTX_NAME, get_str_vect(), i, md_rtx_info::loc, decl::mode, NULL, decl::pos, XCREATENODE, and XSTR.
Referenced by main().
|
static |
Parse construction reservation STR.
References gen_regexp_sequence(), and reserv_str.
Referenced by gen_insn_reserv(), and gen_reserv().
|
static |
Parse reservation STR which possibly contains separator '+'.
References fatal(), gen_regexp_repeat(), get_str_vect(), i, regexp::mode, NULL, REGEXP_ALLOF, reserv_str, rm_allof, and XCREATENODEVAR.
Referenced by gen_regexp_oneof().
|
static |
Parse an element in STR.
References fatal(), gen_regexp_sequence(), regexp::mode, NOTHING_NAME, REGEXP_UNIT, reserv_str, rm_nothing, rm_unit, and XCREATENODE.
Referenced by gen_regexp_repeat().
|
static |
Parse reservation STR which possibly contains separator '|'.
References fatal(), gen_regexp_allof(), get_str_vect(), i, regexp::mode, NULL, REGEXP_ONEOF, reserv_str, rm_oneof, and XCREATENODEVAR.
Referenced by gen_regexp_sequence().
|
static |
Parse construction `repeat' in STR.
References fatal(), gen_regexp_el(), get_str_vect(), i, regexp::mode, NULL, REGEXP_REPEAT, reserv_str, rm_repeat, and XCREATENODE.
Referenced by gen_regexp_allof().
|
static |
Forward declarations of functions used before their definitions, only.
Parse reservation STR which possibly contains separator ','.
References fatal(), gen_regexp_oneof(), get_str_vect(), i, regexp::mode, NULL, REGEXP_SEQUENCE, rm_sequence, and XCREATENODEVAR.
Referenced by gen_regexp(), and gen_regexp_el().
|
static |
Process a DEFINE_RESERVATION. This gives information about a reservation of cpu units. We fill in a struct reserv_decl with information used later by `expand_automata'.
References check_name(), DECL_RESERV, decls, md_rtx_info::def, dm_reserv, gen_regexp(), decl::mode, decl::pos, XCREATENODE, and XSTR.
Referenced by main().
|
static |
The function generates DFA (deterministic finite state automaton) for fast recognition of pipeline hazards. No errors during checking must be fixed before this function call.
References automata_num, automaton_generation_time, create_automata(), create_ticker(), initiate_arcs(), initiate_automata_lists(), initiate_excl_sets(), initiate_pass_states(), initiate_presence_absence_pattern_sets(), initiate_states(), split_argument, ticker_off(), and description::units_num.
Referenced by expand_automata(), and op_by_pieces_d::run().
|
static |
The function sets up and return EXCL_SET which is union of exclusion sets for each unit in IN_SET.
References CHAR_BIT, els_in_cycle_reserv, excl_set, i, unit_excl_set_table, and description::units_num.
Referenced by reserv_sets_are_intersected().
|
static |
The following function returns free node alt_state. It may be new allocated node or node freed earlier.
References allocated_alt_states_num, first_free_alt_state, alt_state::next_alt_state, alt_state::next_sorted_alt_state, NULL, alt_state::state, and XCREATENODE.
Referenced by create_composed_state(), merge_states(), and process_alts_for_forming_states().
|
static |
The following function returns free automata list el. It may be new allocated node or node freed earlier.
References automata_list_el::automaton, first_free_automata_list_el, automata_list_el::next_automata_list_el, NULL, and XCREATENODE.
Referenced by automata_list_add().
|
static |
The following function returns free node state for AUTOMATON. It may be new allocated node or node freed earlier. The function also allocates reservation set if WITH_RESERVS has nonzero value.
References alloc_empty_reserv_sets(), allocated_states_num, state::automaton, state::component_states, curr_unique_state_num, els_in_reservs, first_free_state, state::first_out_arc, gcc_assert, state::it_was_placed_in_stack_for_DFA_forming, state::it_was_placed_in_stack_for_NDFA_forming, max_cycles_num, state::next_equiv_class_state, NULL, state::reservs, state::unique_num, and XCREATENODE.
Referenced by create_composed_state(), make_automaton(), merge_states(), process_alts_for_forming_states(), state_shift(), and states_union().
|
static |
Given a string and a separator, return vector of strings which are elements in the string and number of elements through els_num. Take parentheses into account if PAREN_P has nonzero value. The function also inserts the end marker NULL at the end of vector. Return 0 for the null string, -1 if parentheses are not balanced.
References gcc_assert, i, irp, n_sep_els(), next_sep_el(), and NULL.
Referenced by gen_automaton(), gen_bypass(), gen_cpu_unit(), gen_excl_set(), gen_presence_absence_set(), gen_query_cpu_unit(), gen_regexp_allof(), gen_regexp_oneof(), gen_regexp_repeat(), and gen_regexp_sequence().
|
static |
The function is called by function `pass_states' to count states and arcs of an automaton.
References curr_counted_arcs_num, curr_counted_states_num, first_out_arc(), next_out_arc(), and NULL.
Referenced by count_states_and_arcs().
The function makes initial partition of STATES on equivalent classes and saves it into CLASSES. This function requires the input to be sorted via compare_states_for_equiv().
References compare_states_for_equiv(), state::equiv_class_num_1, i, state::next_equiv_class_state, and NULL.
Referenced by evaluate_equiv_classes().
|
static |
Initialization of the abstract data.
References first_free_alt_state, and NULL.
Referenced by initiate_states().
|
static |
|
static |
Initialization of the abstract data.
References automata_list_eq_p(), automata_list_hash(), automata_list_table, first_free_automata_list_el, and NULL.
Referenced by generate().
|
static |
The function creates empty automaton declaration table and node representing automaton declaration and used for searching automaton declaration with given name. The function must be called only once before any work with the automaton declaration table.
References automaton_decl_eq_p(), automaton_decl_hash(), automaton_decl_table, dm_automaton, decl::mode, and work_automaton_decl.
Referenced by initiate_automaton_gen().
|
static |
The following is top level function to initialize the work of pipeline hazards description translator.
References base_file_name(), file_name_suffix(), initiate_automaton_decl_table(), initiate_decl_table(), initiate_insn_decl_table(), irp, NULL, output_description_file, output_description_file_name, output_file, and STANDARD_OUTPUT_DESCRIPTION_FILE_SUFFIX.
Referenced by main().
|
static |
The function creates empty declaration table and node representing declaration and used for searching declaration with given name. The function must be called only once before any work with the declaration table.
References decl_eq_p(), decl_hash(), decl_table, dm_unit, decl::mode, and work_decl.
Referenced by initiate_automaton_gen().
|
static |
The following function forms the array containing exclusion sets for each unit.
References bitmap_set_bit, DECL_UNIT, description::decls, description::decls_num, dm_unit, els_in_cycle_reserv, excl_set, i, irp, decl::mode, NULL, unit_excl_set_table, and description::units_num.
Referenced by generate().
|
static |
The function creates empty insn declaration table and node representing insn declaration and used for searching insn declaration with given name. The function must be called only once before any work with the insn declaration table.
References dm_insn_reserv, insn_decl_eq_p(), insn_decl_hash(), insn_decl_table, decl::mode, and work_insn_decl.
Referenced by initiate_automaton_gen().
|
static |
The function initializes code for passing of all states.
References curr_state_graph_pass_num.
Referenced by generate().
|
static |
|
static |
Initialization of the abstract data.
References alloc_empty_reserv_sets(), CHAR_BIT, curr_unique_state_num, DECL_UNIT, description::decls, description::decls_num, dm_unit, els_in_cycle_reserv, els_in_reservs, i, initiate_alt_states(), max_cycles_num, description::max_insn_reserv_cycles, decl::mode, state_eq_p(), state_hash(), state_table, temp_reserv, units_array, and description::units_num.
Referenced by generate().
|
static |
The page contains code for finding equivalent automaton insns (ainsns).
The function inserts AINSN into cyclic list CYCLIC_EQUIV_CLASS_INSN_LIST of ainsns.
References ainsn::next_equiv_class_insn, and NULL.
Referenced by process_insn_equiv_class(), and set_insn_equiv_classes().
The function inserts automaton declaration into the table. The function does nothing if an automaton declaration with the same key exists already in the table. The function returns automaton declaration node in the table with the same key as given automaton declaration node.
References automaton_decl_table, and NULL.
Referenced by process_decls().
|
static |
The function inserts BYPASS in the list of bypasses of the corresponding output insn. The order of bypasses in the list is described in a comment for member `bypass_list' (see above). If there is already the same bypass in the list the function reports this and does nothing.
References bypass_decl::bypass_guard_name, insn_reserv_decl::bypass_list, error(), bypass_decl::in_insn_reserv, bypass_decl::in_pattern, last, bypass_decl::next, filedep::next, NULL, bypass_decl::out_insn_reserv, bypass_decl::out_pattern, w_flag, and warning().
Referenced by process_bypass_2().
The function inserts declaration into the table. The function does nothing if a declaration with the same key exists already in the table. The function returns declaration node in the table with the same key as given declaration node.
References decl_table, and NULL.
Referenced by process_decls().
The function inserts insn declaration into the table. The function does nothing if an insn declaration with the same key exists already in the table. The function returns insn declaration node in the table with the same key as given insn declaration node.
References insn_decl_table, and NULL.
Referenced by process_decls().
Insert STATE into the state table.
References NULL, and state_table.
Referenced by create_composed_state(), finish_forming_alt_state(), make_automaton(), state_shift(), and states_union().
|
static |
The function tests insn declarations on equality of their keys. The function is used by abstract data `hashtab'. The function returns 1 if declarations have the same key, 0 otherwise.
References DECL_INSN_RESERV, dm_insn_reserv, gcc_assert, and decl::mode.
Referenced by initiate_insn_decl_table().
|
static |
This page contains abstract data `table of insn declarations'. Elements of the table is nodes representing insn declarations. Key of the table elements is name of given insn (in corresponding define_insn_reservation). Remember that insn names have own space.
The function evaluates hash value of an insn declaration. The function is used by abstract data `hashtab'. The function returns hash value (0..UINT_MAX) of given insn declaration.
References DECL_INSN_RESERV, dm_insn_reserv, gcc_assert, decl::mode, and string_hash().
Referenced by initiate_insn_decl_table().
Return nonzero value if the deterministic states contains a reservation of the same cpu unit on the same cpu cycle.
References state::automaton, gcc_assert, reserv_sets_are_intersected(), and state::reservs.
Referenced by make_automaton().
The following recursive function returns nonzero value if REGEXP contains given decl or reservations in given regexp refers for given decl.
References curr_loop_pass_num, DECL_RESERV, dm_reserv, gcc_unreachable, i, loop_in_regexp(), reserv_decl::loop_pass_num, decl::mode, regexp::mode, NULL, reserv_decl::regexp, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_REPEAT, REGEXP_RESERV, REGEXP_SEQUENCE, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
Referenced by check_loops_in_regexps(), and loop_in_regexp().
int main | ( | int | argc, |
const char ** | argv ) |
References decls, md_rtx_info::def, expand_automata(), FATAL_EXIT_CODE, gen_absence_set(), gen_automata_option(), gen_automaton(), gen_bypass(), gen_cpu_unit(), gen_excl_set(), gen_final_absence_set(), gen_final_presence_set(), gen_insn_reserv(), gen_presence_set(), gen_query_cpu_unit(), gen_reserv(), GET_CODE, have_error, init_rtx_reader_args_cb(), initiate_automaton_gen(), parse_automata_opt(), progname, read_md_rtx(), SUCCESS_EXIT_CODE, and write_automata().
|
static |
The following function creates all states of nondeterministic AUTOMATON.
References add_arc(), automaton::advance_ainsn, automaton::ainsn_list, ainsn::alt_states, ainsn::first_insn_with_same_reservs, form_reservs_matter(), get_free_state(), insert_state(), ainsn::insn_reserv_decl, intersected_state_reservs_p(), state::it_was_placed_in_stack_for_NDFA_forming, ndfa_flag, ainsn::next_ainsn, alt_state::next_alt_state, NULL, progress_flag, special_decl_p(), automaton::start_state, alt_state::state, state_shift(), and states_union().
Referenced by build_automaton().
|
static |
The function merges equivalent states of AUTOMATON.
References add_arc(), state::component_states, state::equiv_class_state, first_out_arc(), free_arc(), get_free_alt_state(), get_free_state(), i, arc::insn, alt_state::next_alt_state, state::next_equiv_class_state, next_out_arc(), alt_state::next_sorted_alt_state, NULL, automaton::start_state, alt_state::state, arc::to_state, and uniq_sort_alt_states().
Referenced by minimize_DFA().
|
static |
The top level function for minimization of deterministic AUTOMATON.
References evaluate_equiv_classes(), merge_states(), pass_states(), and set_new_cycle_flags().
Referenced by build_automaton().
|
static |
Given a string and a separator, return the number of separated elements in it, taking parentheses into account if PAR_FLAG has nonzero value. Return 0 for the null string, -1 if parentheses is not balanced.
Referenced by get_str_vect().
|
static |
The function transforms nondeterministic AUTOMATON into deterministic.
References add_arc(), insn_reserv_decl::arcs_marked_by_insn, automaton::collapse_ainsn, collapse_flag, collapse_ndfa_insn_decl, state::component_states, create_composed_state(), DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, form_arcs_marked_by_insn(), i, state::it_was_placed_in_stack_for_DFA_forming, decl::mode, NULL, progress_flag, automaton::start_state, and alt_state::state.
Referenced by build_automaton().
The function returns next out arc after ARC.
References arc::next_out_arc.
Referenced by clear_arc_insns_equiv_num(), create_composed_state(), find_arc(), form_arcs_marked_by_insn(), form_important_insn_automata_lists(), incr_states_and_arcs_nums(), merge_states(), out_state_arcs_num(), output_dead_lock_vect(), output_min_issue_delay_table(), output_state_arcs(), output_trans_table(), pass_state_graph(), process_state_for_insn_equiv_partition(), set_new_cycle_flags(), set_out_arc_insns_equiv_num(), and state_is_differed().
|
static |
Given a pointer to a (char *) and a separator, return an alloc'ed string containing the next separated element, taking parentheses into account if PAR_FLAG has nonzero value. Advance the pointer to after the string scanned, or the end-of-string. Return NULL if at end of string.
Referenced by get_str_vect().
|
static |
Return number of out arcs of STATE.
References ainsn::first_ainsn_with_given_equivalence_num, first_out_arc(), gcc_assert, arc::insn, next_out_arc(), and NULL.
Referenced by compare_transition_els_num().
|
static |
The function outputs a code for evaluation of a minimal delay of issue of insns which have reservations in given AUTOMATA_LIST.
References CHIP_PARAMETER_NAME, automaton::insn_equiv_classes_num, INTERNAL_INSN_CODE_NAME, automaton::min_issue_delay_table_compression_factor, NULL, output_chip_member_name(), output_file, output_min_issue_delay_vect_name(), output_translate_vect_name(), RESULT_VARIABLE_NAME, and TEMPORARY_VARIABLE_NAME.
Referenced by output_internal_min_issue_delay_func().
|
static |
The function outputs a code changing state after issue of insns which have reservations in given AUTOMATA_LIST.
References CHIP_PARAMETER_NAME, comb_vect_p(), INTERNAL_INSN_CODE_NAME, INTERNAL_MIN_ISSUE_DELAY_FUNC_NAME, automata_list_el::next_automata_list_el, NULL, output_chip_member_name(), output_file, output_state_member_type(), output_temp_chip_member_name(), output_trans_base_vect_name(), output_trans_check_vect_name(), output_trans_comb_vect_name(), output_trans_full_vect_name(), output_translate_vect_name(), and TEMPORARY_VARIABLE_NAME.
Referenced by output_internal_trans_func().
|
static |
The following function output readable representation of DFAs used for fast recognition of pipeline hazards.
References description::first_automaton, automaton::next_automaton, NULL, output_automaton_name(), output_automaton_units(), output_description_file, and pass_states().
Referenced by write_automata().
|
static |
The function outputs name of AUTOMATON.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automaton_descriptions(), and output_statistics().
|
static |
The function outputs units name belonging to AUTOMATON.
References automaton::automaton_order_num, DECL_UNIT, description::decls, description::decls_num, dm_unit, i, MAX_LINE_LENGTH, decl::mode, and output_description_file.
Referenced by output_automaton_descriptions().
|
static |
Output definition of the structure representing current DFA(s) state(s).
References CHIP_NAME, description::first_automaton, automaton::next_automaton, NULL, output_chip_member_name(), output_file, and output_state_member_type().
Referenced by write_automata().
|
static |
The following is name of member which represents state of a DFA for PHR.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automata_list_min_issue_delay_code(), output_automata_list_transition_code(), output_chip_definitions(), output_cpu_unit_reservation_p(), output_internal_dead_lock_func(), and output_temp_chip_member_name().
|
static |
The following function outputs function to check reservation of cpu unit (its internal code will be passed as the function argument) in given cpu state.
References CHIP_NAME, CPU_CODE_PARAMETER_NAME, CPU_UNIT_RESERVATION_P_FUNC_NAME, description::first_automaton, automaton::next_automaton, NULL, output_chip_member_name(), output_file, output_reserved_units_table_name(), description::query_units_num, STATE_NAME, and STATE_TYPE_NAME.
Referenced by write_automata().
|
static |
The function outputs string representation of units reservation on cycle START_CYCLE in the reservation set. The function uses repeat construction if REPETITION_NUM > 1.
References bitmap_bit_p, CHAR_BIT, els_in_cycle_reserv, gcc_assert, NOTHING_NAME, units_array, and description::units_num.
Referenced by output_reserv_sets().
|
static |
The function outputs PHR interface function `state_dead_lock_p'.
References CHIP_NAME, DEAD_LOCK_FUNC_NAME, INTERNAL_DEAD_LOCK_FUNC_NAME, output_file, STATE_NAME, and STATE_TYPE_NAME.
Referenced by write_automata().
|
static |
Form and output vector representing the locked states of AUTOMATON.
References add_states_vect_el(), advance_cycle_insn_decl, DECL_INSN_RESERV, first_out_arc(), gcc_assert, i, arc::insn, ainsn::insn_reserv_decl, automaton::locked_states, next_out_arc(), NULL, state::order_state_num, output_dead_lock_vect_name(), output_file, output_range_type(), output_states_vect, output_vect(), and pass_states().
Referenced by output_tables().
|
static |
Output name of deadlock vector for given automaton.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_dead_lock_vect(), and output_internal_dead_lock_func().
|
static |
Output the array holding default latency values. These are used in insn_latency and maximal_insn_latency function implementations.
References collapse_flag, DECL_INSN_RESERV, description::decls, description::decls_num, insn_reserv_decl::default_latency, dm_insn_reserv, gcc_assert, i, insn_reserv_decl::insn_num, description::insns_num, decl::mode, description::normal_decls_num, output_file, UCHAR_MAX, and USHRT_MAX.
Referenced by write_automata().
|
static |
The function outputs string representation of IR define_reservation and define_insn_reservation.
References DECL_BYPASS, DECL_INSN_RESERV, DECL_RESERV, DECL_UNIT, description::decls, description::decls_num, dm_bypass, dm_insn_reserv, dm_reserv, dm_unit, i, bypass_decl::in_pattern, bypass_decl::latency, decl::mode, description::normal_decls_num, NULL, bypass_decl::out_pattern, output_description_file, output_pattern_set_el_list(), output_regexp(), output_unit_set_el_list(), and print_rtl().
Referenced by write_automata().
|
static |
The function outputs PHR interface functions `dfa_clean_insn_cache' and 'dfa_clear_single_insn_cache'.
References DFA_CLEAN_INSN_CACHE_FUNC_NAME, DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME, DFA_INSN_CODES_LENGTH_VARIABLE_NAME, DFA_INSN_CODES_VARIABLE_NAME, I_VARIABLE_NAME, INSN_PARAMETER_NAME, and output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `dfa_finish'.
References DFA_FINISH_FUNC_NAME, DFA_INSN_CODES_VARIABLE_NAME, and output_file.
Referenced by write_automata().
|
static |
This function outputs `dfa_insn_code' and its helper function `dfa_insn_code_enlarge'.
References DFA_INSN_CODE_FUNC_NAME, DFA_INSN_CODES_LENGTH_VARIABLE_NAME, DFA_INSN_CODES_VARIABLE_NAME, INSN_PARAMETER_NAME, INTERNAL_DFA_INSN_CODE_FUNC_NAME, INTERNAL_INSN_CODE_NAME, and output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `dfa_start'.
References DFA_CLEAN_INSN_CACHE_FUNC_NAME, DFA_INSN_CODES_LENGTH_VARIABLE_NAME, DFA_INSN_CODES_VARIABLE_NAME, DFA_START_FUNC_NAME, and output_file.
Referenced by write_automata().
|
static |
The following function outputs function to obtain internal cpu unit code by the cpu unit name.
References CMP_VARIABLE_NAME, CODE_MEMBER_NAME, CPU_UNIT_NAME_PARAMETER_NAME, free(), GET_CPU_UNIT_CODE_FUNC_NAME, HIGH_VARIABLE_NAME, i, LOW_VARIABLE_NAME, MIDDLE_VARIABLE_NAME, NAME_CODE_STRUCT_NAME, NAME_CODE_TABLE_NAME, NAME_MEMBER_NAME, output_file, qsort, units_array, units_cmp(), and description::units_num.
Referenced by write_automata().
|
static |
The function outputs switch cases for insn reservations using function *output_automata_list_code.
References DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, i, insn_reserv_decl::important_automata_list, insn_reserv_decl::insn_num, decl::mode, insn_reserv_decl::name, output_file, and insn_reserv_decl::processed_p.
Referenced by output_internal_min_issue_delay_func(), and output_internal_trans_func().
|
static |
The following function outputs a function to check if insn has a dfa reservation.
References advance_cycle_insn_decl, ADVANCE_CYCLE_VALUE_NAME, DECL_INSN_RESERV, DFA_INSN_CODE_FUNC_NAME, INSN_HAS_DFA_RESERVATION_P_FUNC_NAME, INSN_PARAMETER_NAME, INTERNAL_INSN_CODE_NAME, and output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `insn_latency'.
References INSN2_PARAMETER_NAME, INSN_LATENCY_FUNC_NAME, INSN_PARAMETER_NAME, INTERNAL_INSN2_CODE_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_INSN_LATENCY_FUNC_NAME, output_file, and output_internal_insn_code_evaluation().
Referenced by write_automata().
|
static |
Output function `internal_dead_lock'.
References CHIP_NAME, CHIP_PARAMETER_NAME, description::first_automaton, INTERNAL_DEAD_LOCK_FUNC_NAME, automaton::locked_states, automaton::next_automaton, NULL, output_chip_member_name(), output_dead_lock_vect_name(), and output_file.
Referenced by write_automata().
|
static |
Output code gcc_checking_assert (insn != 0); insn_code = dfa_insn_code (insn); if (insn_code >= DFA__ADVANCE_CYCLE) return code; where insn denotes INSN_NAME, insn_code denotes INSN_CODE_NAME, and code denotes CODE.
References ADVANCE_CYCLE_VALUE_NAME, DFA_INSN_CODE_FUNC_NAME, and output_file.
Referenced by output_insn_latency_func(), output_maximal_insn_latency_func(), and output_min_insn_conflict_delay_func().
|
static |
Output function `internal_insn_latency'.
References advance_cycle_insn_decl, bypass_decl::bypass_guard_name, DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, gcc_assert, i, bypass_decl::in_insn_reserv, INSN2_PARAMETER_NAME, insn_reserv_decl::insn_num, INSN_PARAMETER_NAME, INTERNAL_INSN2_CODE_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_INSN_LATENCY_FUNC_NAME, bypass_decl::latency, decl::mode, bypass_decl::next, NULL, and output_file.
Referenced by write_automata().
|
static |
Output function `internal_maximum_insn_latency'.
References advance_cycle_insn_decl, DECL_INSN_RESERV, description::decls, description::decls_num, dm_insn_reserv, i, INTERNAL_INSN_CODE_NAME, bypass_decl::latency, decl::mode, bypass_decl::next, NULL, and output_file.
Referenced by write_automata().
|
static |
Output function `internal_min_issue_delay'.
References CHIP_NAME, CHIP_PARAMETER_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_MIN_ISSUE_DELAY_FUNC_NAME, output_automata_list_min_issue_delay_code(), output_file, output_insn_code_cases(), RESULT_VARIABLE_NAME, and TEMPORARY_VARIABLE_NAME.
Referenced by write_automata().
|
static |
Output function `internal_reset'.
References CHIP_NAME, CHIP_PARAMETER_NAME, INTERNAL_RESET_FUNC_NAME, and output_file.
Referenced by write_automata().
|
static |
Output function `internal_state_transition'.
References CHIP_NAME, CHIP_PARAMETER_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_TRANSITION_FUNC_NAME, output_automata_list_transition_code(), output_file, output_insn_code_cases(), and TEMPORARY_VARIABLE_NAME.
Referenced by write_automata().
|
static |
The function outputs definition and value of PHR interface variable `max_insn_queue_index'. Its value is not less than maximal queue length needed for the insn scheduler.
References advance_cycle_insn_decl, DECL_BYPASS, DECL_INSN_RESERV, description::decls, description::decls_num, dm_bypass, dm_insn_reserv, gcc_assert, i, description::max_insn_reserv_cycles, decl::mode, and output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `maximal_insn_latency'.
References INSN_PARAMETER_NAME, INTERNAL_INSN_CODE_NAME, output_file, and output_internal_insn_code_evaluation().
Referenced by write_automata().
|
static |
Output function `min_insn_conflict_delay'.
References CHIP_NAME, INSN2_PARAMETER_NAME, INSN_PARAMETER_NAME, INTERNAL_INSN2_CODE_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_MIN_ISSUE_DELAY_FUNC_NAME, INTERNAL_RESET_FUNC_NAME, INTERNAL_TRANSITION_FUNC_NAME, MIN_INSN_CONFLICT_DELAY_FUNC_NAME, output_file, output_internal_insn_code_evaluation(), STATE_NAME, and STATE_TYPE_NAME.
Referenced by write_automata().
|
static |
Output function `min_issue_delay'.
References ADVANCE_CYCLE_VALUE_NAME, CHIP_NAME, DFA_INSN_CODE_FUNC_NAME, INSN_PARAMETER_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_MIN_ISSUE_DELAY_FUNC_NAME, MIN_ISSUE_DELAY_FUNC_NAME, output_file, STATE_NAME, and STATE_TYPE_NAME.
Referenced by write_automata().
|
static |
Form and output vectors representing minimal issue delay table of AUTOMATON. The table is state x ainsn -> minimal issue delay of the ainsn.
References add_states_vect_el(), advance_cycle_insn_decl, automaton::ainsn_list, changed, DECL_INSN_RESERV, ainsn::first_ainsn_with_given_equivalence_num, first_out_arc(), i, arc::insn, ainsn::insn_equiv_class_num, automaton::insn_equiv_classes_num, ainsn::insn_reserv_decl, automaton::max_min_delay, automaton::min_issue_delay_table_compression_factor, ainsn::next_ainsn, next_out_arc(), state::order_state_num, output_file, output_min_issue_delay_vect_name(), output_range_type(), output_states_vect, output_vect(), pass_states(), and arc::to_state.
Referenced by output_tables().
|
static |
Output name of simple min issue delay table representation.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automata_list_min_issue_delay_code(), and output_min_issue_delay_table().
|
static |
Output patterns in LIST separated by comma.
References i, NULL, and output_description_file.
Referenced by output_description().
|
static |
The function outputs PHR interface function `print_reservation'.
References advance_cycle_insn_decl, ADVANCE_CYCLE_VALUE_NAME, collapse_flag, DECL_INSN_RESERV, description::decls, DFA_INSN_CODE_FUNC_NAME, dm_insn_reserv, FILE_PARAMETER_NAME, finish_regexp_representation(), gcc_assert, i, INSN_PARAMETER_NAME, description::insns_num, INTERNAL_INSN_CODE_NAME, decl::mode, description::normal_decls_num, NOTHING_NAME, output_file, PRINT_RESERVATION_FUNC_NAME, and regexp_representation().
Referenced by write_automata().
|
static |
This page contains code for output PHR (pipeline hazards recognizer).
The function outputs minimal C type which is sufficient for representation numbers in range min_range_value and max_range_value. Because host machine and build machine may be different, we use here minimal values required by ANSI C standard instead of UCHAR_MAX, SHRT_MAX, SHRT_MIN, etc. This is a good approximation.
Referenced by output_dead_lock_vect(), output_min_issue_delay_table(), output_reserved_units_table(), output_state_ainsn_table(), output_state_member_type(), and output_translate_vect().
|
static |
The page contains code for output description file (readable representation of original description and generated DFA(s).
The function outputs string representation of IR reservation.
References finish_regexp_representation(), output_description_file, and regexp_representation().
Referenced by output_description().
|
static |
The function outputs string representation of units reservation in the reservation set.
References els_in_cycle_reserv, max_cycles_num, and output_cycle_reservs().
Referenced by output_state().
|
static |
Form and output vector representing reserved units of the states of AUTOMATON.
References add_states_vect_el(), CPU_UNITS_QUERY_MACRO_NAME, first_cycle_unit_presence(), i, state::order_state_num, output_file, output_range_type(), output_reserved_units_table_name(), output_states_vect, output_vect(), pass_states(), unit_decl::query_num, description::query_units_num, units_array, and description::units_num.
Referenced by output_tables().
|
static |
Output name of reserved units table for AUTOMATON into file F.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_cpu_unit_reservation_p(), and output_reserved_units_table().
|
static |
The function outputs PHR interface function `state_reset'.
References CHIP_NAME, INTERNAL_RESET_FUNC_NAME, output_file, RESET_FUNC_NAME, STATE_NAME, and STATE_TYPE_NAME.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `state_size'.
References CHIP_NAME, output_file, and SIZE_FUNC_NAME.
Referenced by write_automata().
|
static |
The following function output readable representation of DFA(s) state used for fast recognition of pipeline hazards. State is described by possible (current and scheduled) cpu unit reservations.
References add_state_reservs(), i, state::new_cycle_p, state::order_state_num, output_description_file, output_reserv_sets(), output_state_arcs(), remove_state_duplicate_reservs(), state_reservs, and state_reservs_cmp().
|
static |
The following function outputs the best C representation of the table TAB of given TABLE_NAME.
References automaton::achieved_states_num, state_ainsn_table::automaton, state_ainsn_table::base_vect, state_ainsn_table::check_vect, state_ainsn_table::comb_vect, comb_vect_p(), state_ainsn_table::full_vect, state_ainsn_table::max_base_vect_el_value, state_ainsn_table::max_comb_vect_el_value, state_ainsn_table::min_base_vect_el_value, state_ainsn_table::min_comb_vect_el_value, output_file, output_range_type(), and output_vect().
Referenced by output_trans_table().
|
static |
The function outputs readable representation of all out arcs of STATE.
References ainsn::first_insn_with_same_reservs, first_out_arc(), gcc_assert, arc::insn, ainsn::insn_equiv_class_num, ainsn::insn_reserv_decl, MAX_LINE_LENGTH, insn_reserv_decl::name, next_out_arc(), ainsn::next_same_reservs_insn, NULL, state::order_state_num, output_description_file, and arc::to_state.
Referenced by output_state().
|
static |
Output C type which is used for representation of codes of states of AUTOMATON.
References automaton::achieved_states_num, and output_range_type().
Referenced by output_automata_list_transition_code(), and output_chip_definitions().
|
static |
The page contains top level function for generation DFA(s) used for PHR.
The function outputs statistics about work of different phases of DFA generator.
References allocated_alt_states_num, allocated_arcs_num, allocated_states_num, state_ainsn_table::comb_vect, comb_vect_p(), automaton::DFA_arcs_num, automaton::DFA_states_num, description::first_automaton, state_ainsn_table::full_vect, automaton::insn_equiv_classes_num, description::insns_num, automaton::locked_states, automaton::min_issue_delay_table_compression_factor, automaton::minimal_DFA_arcs_num, automaton::minimal_DFA_states_num, automaton::NDFA_arcs_num, automaton::NDFA_states_num, automaton::next_automaton, no_minimization_flag, NULL, output_automaton_name(), and automaton::trans_table.
Referenced by write_automata().
|
static |
The function outputs all tables representing DFA(s) used for fast pipeline hazards recognition.
References advance_cycle_insn_decl, ADVANCE_CYCLE_VALUE_NAME, collapse_flag, collapse_ndfa_insn_decl, COLLAPSE_NDFA_VALUE_NAME, DECL_INSN_RESERV, description::first_automaton, insn_reserv_decl::insn_num, automaton::next_automaton, NULL, output_dead_lock_vect(), output_file, output_min_issue_delay_table(), output_reserved_units_table(), output_trans_table(), and output_translate_vect().
Referenced by write_automata().
|
static |
The following is name of temporary variable which stores state of a DFA for PHR.
References output_chip_member_name().
Referenced by output_automata_list_transition_code().
|
static |
The function output times of work of different phases of DFA generator.
References automaton_generation_time, equiv_time, minimize_time, ndfa_flag, NDFA_time, NDFA_to_DFA_time, output_time, print_active_time(), and transform_time.
Referenced by write_automata().
|
static |
Output name of base vector of the transition table for given automaton.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automata_list_transition_code(), and output_trans_table().
|
static |
Output name of check vector of the transition table for given automaton.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automata_list_transition_code(), and output_trans_table().
|
static |
Output name of comb vector of the transition table for given automaton.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automata_list_transition_code(), and output_trans_table().
|
static |
Output name for simple transition table representation.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automata_list_transition_code(), and output_trans_table().
|
static |
The function outputs PHR interface function `state_transition'.
References ADVANCE_CYCLE_VALUE_NAME, CHIP_NAME, collapse_flag, COLLAPSE_NDFA_VALUE_NAME, DFA_INSN_CODE_FUNC_NAME, INSN_PARAMETER_NAME, INTERNAL_INSN_CODE_NAME, INTERNAL_TRANSITION_FUNC_NAME, output_file, STATE_NAME, STATE_TYPE_NAME, and TRANSITION_FUNC_NAME.
Referenced by write_automata().
|
static |
Form and output vectors (comb, check, base or full vector) representing transition table of AUTOMATON.
References automaton::achieved_states_num, add_states_vect_el(), add_vect(), add_vect_el(), compare_transition_els_num(), create_state_ainsn_table(), ainsn::first_ainsn_with_given_equivalence_num, first_out_arc(), gcc_assert, i, arc::insn, next_out_arc(), NULL, state::order_state_num, output_state_ainsn_table(), output_states_vect, output_trans_base_vect_name(), output_trans_check_vect_name(), output_trans_comb_vect_name(), output_trans_full_vect_name(), pass_states(), arc::to_state, automaton::trans_table, and undefined_vect_el_value.
Referenced by output_tables().
|
static |
The function outputs translate vector of internal insn code into insn equivalence class number. The equivalence class number is used to access to table and vectors representing DFA(s).
References automaton::ainsn_list, ainsn::insn_equiv_class_num, automaton::insn_equiv_classes_num, insn_reserv_decl::insn_num, ainsn::insn_reserv_decl, description::insns_num, ainsn::next_ainsn, NULL, output_file, output_range_type(), output_translate_vect_name(), and output_vect().
Referenced by output_tables().
|
static |
Output name of translate vector for given automaton.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, automaton_decl::name, and NULL.
Referenced by output_automata_list_min_issue_delay_code(), output_automata_list_transition_code(), and output_translate_vect().
|
static |
Output names of units in LIST separated by comma.
References NULL, and output_description_file.
Referenced by output_description().
|
static |
The function outputs all initialization values of VECT.
References i, and output_file.
Referenced by output_dead_lock_vect(), output_min_issue_delay_table(), output_reserved_units_table(), output_state_ainsn_table(), and output_translate_vect().
|
static |
A function passed as argument to init_rtx_reader_args_cb. It parses the options available for genautomata. Returns true if the option was recognized.
References collapse_flag, COLLAPSE_OPTION, fatal(), ndfa_flag, NDFA_OPTION, no_minimization_flag, NO_MINIMIZATION_OPTION, progress_flag, PROGRESS_OPTION, stats_flag, STATS_OPTION, time_flag, TIME_OPTION, v_flag, V_OPTION, w_flag, and W_OPTION.
Referenced by main().
|
static |
The function processes equivalence class given by its first state, FIRST_STATE, on odd iteration if ODD_ITERATION_FLAG. If there are not equivalent states, the function partitions the class removing nonequivalent states and placing them in *NEXT_ITERATION_CLASSES, increments *NEW_EQUIV_CLASS_NUM_PTR ans assigns it to the state equivalence number. If the class has been partitioned, the function returns nonzero value.
References clear_arc_insns_equiv_num(), state::equiv_class_num_1, state::equiv_class_num_2, state::next_equiv_class_state, NULL, set_out_arc_insns_equiv_num(), and state_is_differed().
Referenced by evaluate_equiv_classes().
This recursive function passes all states achieved from START_STATE and applies APPLIED_FUNC to them.
References curr_state_graph_pass_num, first_out_arc(), next_out_arc(), NULL, state::pass_num, pass_state_graph(), and arc::to_state.
Referenced by pass_state_graph(), and pass_states().
|
static |
This recursive function passes all states of AUTOMATON and applies APPLIED_FUNC to them.
References curr_state_graph_pass_num, pass_state_graph(), and automaton::start_state.
Referenced by count_states_and_arcs(), enumerate_states(), evaluate_equiv_classes(), form_important_insn_automata_lists(), minimize_DFA(), output_automaton_descriptions(), output_dead_lock_vect(), output_min_issue_delay_table(), output_reserved_units_table(), output_trans_table(), and set_insn_equiv_classes().
|
static |
The following function returns string representation of active time of given ticker. The result is string representation of seconds with accuracy of 1/100 second. Only result of the last call of the function exists. Therefore the following code is not correct printf ("parser time: %s\ngeneration time: %s\n", active_time_string (parser_ticker), active_time_string (generation_ticker)); Correct code has to be the following printf ("parser time: %s\n", active_time_string (parser_ticker)); printf ("generation time: %s\n", active_time_string (generation_ticker));
References active_time().
Referenced by output_time_statistics(), and write_automata().
|
static |
This recursive function processes `|' in reservation REGEXP for forming alt_states of AUTOMATON. List of the alt states should have the same order as in the description.
References alt_state_being_formed, ainsn::alt_states, curr_ainsn, finish_forming_alt_state(), gcc_assert, get_free_alt_state(), get_free_state(), i, regexp::mode, alt_state::next_alt_state, process_alts_for_forming_states(), process_seq_for_forming_states(), REGEXP_ONEOF, rm_oneof, alt_state::state, and state_being_formed.
Referenced by create_alt_states(), and process_alts_for_forming_states().
|
static |
Process define_bypass decl BYPASS, inserting a bypass for each specific pair of insn reservations.
References DECL_BYPASS, for_each_matching_insn(), bypass_decl::in_pattern, NULL, and process_bypass_1().
Referenced by process_decls().
A subroutine of process_bypass that is called for each input instruction IN_INSN_RESERV.
References DECL_BYPASS, for_each_matching_insn(), bypass_decl::in_insn_reserv, bypass_decl::out_pattern, and process_bypass_2().
Referenced by process_bypass().
A subroutine of process_bypass that is called for each pair of matching instructions. OUT_INSN_RESERV is the output instruction and DATA is the input instruction.
References bypass_decl::bypass_guard_name, DECL_BYPASS, DECL_INSN_RESERV, bypass_decl::in_insn_reserv, bypass_decl::in_pattern, insert_bypass(), bypass_decl::latency, bypass_decl::out_insn_reserv, and bypass_decl::out_pattern.
Referenced by process_bypass_1().
|
static |
The function processes pipeline description declarations, checks their correctness, and forms exclusion/presence/absence sets.
References add_excls(), add_presence_absence(), DECL_ABSENCE, DECL_AUTOMATON, DECL_BYPASS, DECL_EXCL, DECL_INSN_RESERV, DECL_PRESENCE, DECL_RESERV, DECL_UNIT, description::decls, description::decls_num, dm_absence, dm_automaton, dm_bypass, dm_excl, dm_insn_reserv, dm_presence, dm_reserv, dm_unit, error(), find_automaton_decl(), find_decl(), i, bypass_decl::in_pattern, insert_automaton_decl(), insert_decl(), insert_insn_decl(), description::insns_num, bypass_decl::latency, decl::mode, names, NOTHING_NAME, NULL, bypass_decl::out_pattern, patterns, decl::pos, process_bypass(), process_excls(), process_presence_absence_names(), process_presence_absence_patterns(), description::units_num, w_flag, and warning().
Referenced by check_all_description().
|
static |
This page contains checker of pipeline hazard description.
Checking NAMES in an exclusion clause vector and returning formed unit_set_el_list.
References DECL_UNIT, dm_unit, error(), find_decl(), i, decl::mode, names, unit_set_el::next_unit_set_el, NULL, unit_set_el::unit_decl, and XCREATENODE.
Referenced by process_decls().
The function processes AINSN of a state in order to find equivalent ainsns. INSN_ARCS_ARRAY is table: code of insn -> out arc of the state.
References curr_insn, delete_ainsn_from_equiv_class(), gcc_assert, insert_ainsn_into_equiv_class(), insn_reserv_decl::insn_num, ainsn::insn_reserv_decl, next_insn(), NULL, and arc::to_state.
Referenced by process_state_for_insn_equiv_partition().
|
static |
Checking NAMES in presence/absence clause and returning the formed unit_set_el_list. The function is called only after processing all exclusion sets.
References DECL_UNIT, dm_unit, error(), find_decl(), i, decl::mode, names, unit_set_el::next_unit_set_el, NULL, unit_set_el::unit_decl, and XCREATENODE.
Referenced by process_decls().
|
static |
Checking NAMES in patterns of a presence/absence clause and returning the formed pattern_set_el_list. The function is called only after processing all exclusion sets.
References DECL_UNIT, dm_unit, error(), find_decl(), i, decl::mode, pattern_set_el::next_pattern_set_el, NULL, patterns, pattern_set_el::unit_decls, pattern_set_el::units_num, and XCREATENODEVAR.
Referenced by process_decls().
The following recursive function processes all regexp in order to fix usage of units or reservations and to fix errors of undeclared name. The function may change unit_regexp onto reserv_regexp. Remember that reserv_regexp does not exist before the function call.
References DECL_RESERV, DECL_UNIT, dm_reserv, dm_unit, error(), find_decl(), gcc_unreachable, i, decl::mode, regexp::mode, NULL, regexp::pos, process_regexp(), REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_REPEAT, REGEXP_RESERV, REGEXP_SEQUENCE, REGEXP_UNIT, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, rm_unit, and XCREATENODE.
Referenced by process_regexp(), and process_regexp_decls().
|
static |
The function recursively processes IR of reservation and defines max and min cycle for reservation of unit.
References gcc_unreachable, i, unit_decl::max_occ_cycle_num, unit_decl::min_occ_cycle_num, regexp::mode, process_regexp_cycles(), reserv_decl::regexp, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_REPEAT, REGEXP_RESERV, REGEXP_SEQUENCE, REGEXP_UNIT, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
Referenced by evaluate_max_reserv_cycles(), and process_regexp_cycles().
|
static |
The following function processes regexp of define_reservation and define_insn_reservation with the aid of function `process_regexp'.
References DECL_INSN_RESERV, DECL_RESERV, description::decls, description::decls_num, dm_insn_reserv, dm_reserv, i, decl::mode, and process_regexp().
Referenced by check_all_description().
|
static |
This recursive function processes `,' and units in reservation REGEXP for forming alt_states of AUTOMATON. It is believed that CURR_CYCLE is start cycle of all reservation REGEXP.
References automaton::automaton_order_num, unit_decl::corresponding_automaton_num, gcc_unreachable, i, regexp::mode, NULL, process_seq_for_forming_states(), REGEXP_ALLOF, REGEXP_SEQUENCE, REGEXP_UNIT, rm_allof, rm_nothing, rm_sequence, rm_unit, set_state_reserv(), state_being_formed, and unit_decl::unit_num.
Referenced by process_alts_for_forming_states(), and process_seq_for_forming_states().
|
static |
The function processes STATE in order to find equivalent ainsns.
References first_out_arc(), free(), arc::insn, insn_reserv_decl::insn_num, ainsn::insn_reserv_decl, description::insns_num, next_out_arc(), NULL, and process_insn_equiv_class().
Referenced by set_insn_equiv_classes().
|
static |
The function returns string representation of REGEXP on IR obstack.
References form_regexp(), and irp.
Referenced by output_print_reservation_func(), and output_regexp().
|
static |
The function traverses IR of reservation and applies transformations implemented by FUNC.
References gcc_unreachable, i, regexp::mode, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_REPEAT, REGEXP_SEQUENCE, regexp_transform_func(), rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_sequence, and rm_unit.
Referenced by regexp_transform_func(), and transform_regexp().
The function removes and frees ARC staring from FROM_STATE.
References state::first_out_arc, free_arc(), gcc_assert, arc::next_out_arc, NULL, and state::num_out_arcs.
Referenced by create_composed_state().
|
static |
The following function is used for sorting possible cpu unit reservation of a DFA state.
References i, reserv_sets_cmp(), and state_reservs.
Referenced by output_state().
|
static |
AND of the reservation sets.
References els_in_reservs, and gcc_assert.
Referenced by state_shift(), and states_union().
|
static |
The function checks that the reservation sets are intersected, i.e. there is a unit reservation on a cycle in both reservation sets.
References check_absence_pattern_sets(), check_presence_pattern_sets(), els_in_cycle_reserv, els_in_reservs, gcc_assert, get_excl_set(), reserv_sets_or(), and temp_reserv.
Referenced by intersected_state_reservs_p().
|
static |
Comparison of given reservation sets.
References els_in_reservs, and gcc_assert.
Referenced by remove_state_duplicate_reservs(), reserv_sets_eq(), and state_reservs_cmp().
|
static |
The function checks equality of the reservation sets.
References reserv_sets_cmp().
Referenced by state_eq_p().
|
static |
Hash value of reservation set.
References CHAR_BIT, els_in_reservs, and i.
Referenced by state_hash().
|
static |
OR of the reservation sets.
References els_in_reservs, and gcc_assert.
Referenced by reserv_sets_are_intersected(), and states_union().
|
static |
The function sets up RESULT bits by bits of OPERAND shifted on one cpu cycle. The remaining bits of OPERAND (representing the last cycle unit reservations) are not changed.
References els_in_cycle_reserv, els_in_reservs, gcc_assert, and i.
Referenced by state_shift().
|
static |
The function searches for equivalent ainsns of AUTOMATON.
References automaton::ainsn_list, curr_insn, ainsn::first_ainsn_with_given_equivalence_num, ainsn::first_insn_with_same_reservs, gcc_assert, insert_ainsn_into_equiv_class(), ainsn::insn_equiv_class_num, automaton::insn_equiv_classes_num, ainsn::next_ainsn, ainsn::next_same_reservs_insn, NULL, pass_states(), and process_state_for_insn_equiv_partition().
Referenced by create_automata().
|
static |
The function sets up new_cycle_p for states if there is arc to the state marked by advance_cycle_insn_decl.
References advance_cycle_insn_decl, DECL_INSN_RESERV, first_out_arc(), arc::insn, ainsn::insn_reserv_decl, state::new_cycle_p, next_out_arc(), NULL, and arc::to_state.
Referenced by minimize_DFA().
|
static |
The function is called by function `pass_states' for enumerating states.
References curr_state_order_num, and state::order_state_num.
Referenced by enumerate_states().
|
static |
The function sets up equivalence numbers of insns which mark all out arcs of STATE by equiv_class_num_1 (if ODD_ITERATION_FLAG has nonzero value) or by equiv_class_num_2 of the destination state.
References insn_reserv_decl::equiv_class_num, state::equiv_class_num_1, state::equiv_class_num_2, first_out_arc(), gcc_assert, arc::insn, ainsn::insn_reserv_decl, next_out_arc(), NULL, and arc::to_state.
Referenced by partition_equiv_class().
|
static |
Add reservation of unit with UNIT_NUM on cycle CYCLE_NUM to deterministic STATE.
References state::reservs, and set_unit_reserv().
Referenced by process_seq_for_forming_states().
|
static |
Set up in the reservation set that unit with UNIT_NUM is used on CYCLE_NUM.
References bitmap_set_bit, CHAR_BIT, els_in_cycle_reserv, gcc_assert, and max_cycles_num.
Referenced by form_reservs_matter(), and set_state_reserv().
|
static |
True if DECL is either of the two special decls we created.
References advance_cycle_insn_decl, collapse_flag, collapse_ndfa_insn_decl, and DECL_INSN_RESERV.
Referenced by create_alt_states(), form_ainsn_with_same_reservs(), and make_automaton().
|
static |
Return nonzero value if the states are the same.
References alt_state::next_sorted_alt_state, NULL, reserv_sets_eq(), and alt_state::state.
Referenced by initiate_states().
|
static |
Hash value of STATE. If STATE represents deterministic state it is simply hash value of the corresponding reservation set. Otherwise it is formed from hash values of the component deterministic states. One more key is order number of state automaton.
References CHAR_BIT, alt_state::next_sorted_alt_state, NULL, reserv_sets_hash_value(), alt_state::state, and state::unique_num.
Referenced by initiate_states().
|
static |
The function returns nonzero value if STATE is not equivalent to ANOTHER_STATE from the same current partition on equivalence classes. Another state has ANOTHER_STATE_OUT_ARCS_NUM number of output arcs. Iteration of making equivalence partition is defined by ODD_ITERATION_FLAG.
References CHAR_BIT, insn_reserv_decl::equiv_class_num, state::equiv_class_num_1, state::equiv_class_num_2, first_out_arc(), gcc_assert, arc::insn, ainsn::insn_reserv_decl, next_out_arc(), NULL, state::num_out_arcs, state::presence_signature, description::query_units_num, si, and arc::to_state.
Referenced by partition_equiv_class().
|
static |
The following function is used for sorting possible cpu unit reservation of a DFA state.
References reserv_sets_cmp().
Referenced by output_state().
|
static |
Return deterministic state (inserted into the table) which represent the automaton state is obtained from deterministic STATE by advancing cpu cycle and masking by RESERVS.
References state::automaton, free_state(), get_free_state(), insert_state(), reserv_sets_and(), reserv_sets_shift(), and state::reservs.
Referenced by make_automaton().
|
static |
Return deterministic state (inserted into the table) which representing the automaton state which is union of reservations of the deterministic states masked by RESERVS.
References state::automaton, free_state(), gcc_assert, get_free_state(), insert_state(), reserv_sets_and(), reserv_sets_or(), and state::reservs.
Referenced by make_automaton().
The following function creates the structure unit_usage for UNIT on CYCLE in REGEXP alternative with ALT_NUM. The structure is made accessed through cycle_alt_unit_usages.
References cycle_alt_unit_usages, gcc_assert, unit_decl::last_distribution_check_cycle, regexp::mode, unit_usage::next, NULL, REGEXP_ONEOF, REGEXP_UNIT, rm_oneof, unit_usage::unit_decl, and unit_usages.
Referenced by check_regexp_units_distribution().
|
static |
The function evaluates hash value (0..UINT_MAX) of string.
Referenced by automaton_decl_hash(), decl_hash(), and insn_decl_hash().
|
static |
Set up in the reservation set RESERVS that unit with UNIT_NUM is used on CYCLE_NUM.
References bitmap_bit_p, CHAR_BIT, els_in_cycle_reserv, gcc_assert, and max_cycles_num.
Referenced by first_cycle_unit_presence().
|
static |
The following function switches off given ticker.
References ticker::incremented_off_time.
Referenced by build_automaton(), create_automata(), expand_automata(), generate(), transform_insn_regexps(), and write_automata().
|
static |
The following function switches on given ticker.
References ticker::incremented_off_time, and ticker::modified_creation_time.
Referenced by build_automaton(), and create_automata().
The function makes transformation A*N -> A, A, ...
References copy_insn_regexp(), gcc_assert, i, regexp::mode, regexp::pos, REGEXP_REPEAT, REGEXP_SEQUENCE, regexp_transformed_p, rm_repeat, rm_sequence, and XCREATENODEVAR.
Referenced by transform_regexp().
The function makes transformations ...,(A,B,...),C,... -> ...,A,B,...,C,... ...+(A+B+...)+C+... -> ...+A+B+...+C+... ...|(A|B|...)|C|... -> ...|A|B|...|C|...
References copy_insn_regexp(), gcc_assert, i, regexp::mode, NULL, regexp::pos, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_SEQUENCE, regexp_transformed_p, rm_allof, rm_oneof, rm_sequence, and XCREATENODEVAR.
Referenced by transform_regexp().
The function makes transformations ...,A|B|...,C,... -> (...,A,C,...)|(...,B,C,...)|... ...+(A|B|...)+C+... -> (...+A+C+...)|(...+B+C+...)|... ...+(A,B,...)+C+... -> (...+A+C+...),B,... ...+(A,B,...)+(C,D,...) -> (A+C),(B+D),...
References copy_insn_regexp(), gcc_assert, i, regexp::mode, NULL, regexp::pos, REGEXP_ALLOF, REGEXP_ONEOF, REGEXP_SEQUENCE, regexp_transformed_p, rm_allof, rm_nothing, rm_oneof, rm_sequence, rm_unit, and XCREATENODEVAR.
Referenced by transform_regexp().
|
static |
The function applies all transformations for reservations of all insn declarations.
References add_advance_cycle_insn_decl(), add_collapse_ndfa_insn_decl(), collapse_flag, copy_insn_regexp(), create_ticker(), DECL_INSN_RESERV, description::decls, dm_insn_reserv, i, decl::mode, description::normal_decls_num, progress_flag, ticker_off(), transform_regexp(), and transform_time.
Referenced by expand_automata().
The function applies all transformations for IR representation of reservation REGEXP.
References regexp_transform_func(), regexp_transformed_p, transform_1(), transform_2(), and transform_3().
Referenced by transform_insn_regexps().
|
static |
The function sorts ALT_STATES_LIST and removes duplicated alt states from the list. The comparison key is alt state unique number.
References alt_state_cmp(), i, alt_state::next_alt_state, and NULL.
Referenced by create_alt_states(), create_composed_state(), and merge_states().
|
static |
Return true if unit UNIT_DECL is present on the LIST.
References unit_usage::next, NULL, and unit_usage::unit_decl.
Referenced by check_regexp_units_distribution().
|
static |
The following function is used to sort unit declaration by their names.
References unit_decl::name.
Referenced by output_get_cpu_unit_code_func().
|
static |
The function assigns automata to units according to constructions `define_automaton' in the description.
References automaton_decl::corresponding_automaton, DECL_UNIT, description::decls, description::decls_num, dm_unit, i, decl::mode, and NULL.
Referenced by create_automata().
|
static |
The function makes heuristic assigning automata to units. Actually efficacy of the algorithm has been checked yet???
References automata_num, compare_max_occ_cycle_nums(), unit_decl::corresponding_automaton_num, DECL_UNIT, description::decls, description::decls_num, dm_unit, estimate_one_automaton_bound(), free(), gcc_assert, i, unit_decl::max_occ_cycle_num, decl::mode, qsort, and description::units_num.
Referenced by create_automata().
|
static |
The following is top level function to output PHR and to finish work with pipeline description translator.
References all_time, check_time, CPU_UNITS_QUERY_MACRO_NAME, create_ticker(), DFA_INSN_CODES_LENGTH_VARIABLE_NAME, DFA_INSN_CODES_VARIABLE_NAME, errno, fatal(), FATAL_EXIT_CODE, finish_arcs(), finish_automata_lists(), finish_automaton_decl_table(), finish_decl_table(), finish_insn_decl_table(), finish_states(), fopen, generation_time, have_error, irp, NULL, output_automaton_descriptions(), output_chip_definitions(), output_cpu_unit_reservation_p(), output_dead_lock_func(), output_default_latencies(), output_description(), output_description_file, output_description_file_name, output_dfa_clean_insn_cache_func(), output_dfa_finish_func(), output_dfa_insn_code_func(), output_dfa_start_func(), output_file, output_get_cpu_unit_code_func(), output_insn_has_dfa_reservation_p(), output_insn_latency_func(), output_internal_dead_lock_func(), output_internal_insn_latency_func(), output_internal_maximal_insn_latency_func(), output_internal_min_issue_delay_func(), output_internal_reset_func(), output_internal_trans_func(), output_max_insn_queue_index_def(), output_maximal_insn_latency_func(), output_min_insn_conflict_delay_func(), output_min_issue_delay_func(), output_print_reservation_func(), output_reset_func(), output_size_func(), output_statistics(), output_tables(), output_time, output_time_statistics(), output_trans_func(), print_active_time(), progress_flag, stats_flag, ticker_off(), time_flag, and v_flag.
Referenced by main().
|
static |
Pseudo insn decl which denotes advancing cycle.
Referenced by add_advance_cycle_insn_decl(), create_ainsns(), create_composed_state(), output_dead_lock_vect(), output_insn_has_dfa_reservation_p(), output_internal_insn_latency_func(), output_internal_maximal_insn_latency_func(), output_max_insn_queue_index_def(), output_min_issue_delay_table(), output_print_reservation_func(), output_tables(), set_new_cycle_flags(), and special_decl_p().
The following vla is used for storing pointers to all achieved states.
Referenced by add_achieved_state(), and evaluate_equiv_classes().
|
static |
Referenced by expand_automata(), print_time(), and write_automata().
|
static |
The following variables is maximal number of allocated nodes alt_state.
Referenced by get_free_alt_state(), and output_statistics().
|
static |
The following variables is maximal number of allocated nodes `arc'.
Referenced by add_arc(), and output_statistics().
|
static |
The following variables is maximal number of allocated nodes `state'.
Referenced by get_free_state(), and output_statistics().
|
static |
Current alt_state being formed.
Referenced by process_alts_for_forming_states().
|
static |
The following variable value is TRUE if the first annotated message about units to automata distribution has been output.
Referenced by check_regexp_units_distribution(), and check_unit_distributions_to_automata().
|
static |
Hash table of automata lists.
Referenced by automata_list_finish(), finish_automata_lists(), and initiate_automata_lists().
|
static |
The following variable value is number of automaton which are really being created. This value is defined on the base of argument of option `-split'. If the variable has zero value the number of automata is defined by the constructions `%automaton'. This case occurs when option `-split' is absent or has zero argument. If constructions `define_automaton' is absent only one automaton is created.
Referenced by create_automata(), estimate_one_automaton_bound(), generate(), and units_to_automata_heuristic_distr().
|
static |
The automaton declaration table itself is represented by the following variable.
Referenced by find_automaton_decl(), finish_automaton_decl_table(), initiate_automaton_decl_table(), and insert_automaton_decl().
The vector contains all decls which are automata.
Referenced by check_unit_distributions_to_automata().
|
static |
Referenced by generate(), and output_time_statistics().
The following vla is used for storing pointers to all achieved states.
Referenced by add_automaton_state(), and form_important_insn_automata_lists().
|
static |
The following variable values are times of all checking all generation all pipeline hazard translator work
Referenced by expand_automata(), and write_automata().
|
static |
When making an NDFA, produce additional transitions that collapse NDFA state into a deterministic one suitable for query