GCC Middle and Back End API Reference
|
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 |
struct | state |
struct | arc |
struct | alt_state |
struct | ainsn |
struct | automaton |
struct | automata_list_el |
struct | state_ainsn_table |
struct | unit_usage |
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 struct unit_decl * | const_unit_decl_t |
typedef struct decl * | decl_t |
typedef 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 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 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 } |
typedef struct alt_state* alt_state_t |
typedef struct automata_list_el* automata_list_el_t |
typedef struct automaton* automaton_t |
typedef struct automata_list_el* const_automata_list_el_t |
typedef struct decl* const_decl_t |
typedef const set_el_t* const_reserv_sets_t |
typedef struct state* const_state_t |
typedef 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.
Referenced by evaluate_equiv_classes().
|
static |
Create and record a decl for the special advance-cycle transition.
References advance_cycle_insn_decl, description::decls, description::decls_num, dm_insn_reserv, description::insns_num, decl::mode, no_pos, and decl::pos.
Referenced by transform_insn_regexps().
|
static |
The function adds arc from FROM_STATE to TO_STATE marked by AINSN, unless such an arc already exists.
References ainsn::arc_exists_p, find_arc(), first_free_arc, state::first_out_arc, and state::num_out_arcs.
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.
Referenced by form_important_insn_automata_lists().
|
static |
Create and record a decl for the special collapse-NDFA transition.
References collapse_ndfa_insn_decl, description::decls, description::decls_num, dm_insn_reserv, description::insns_num, decl::mode, no_pos, and decl::pos.
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, copy(), error(), unit_decl::excl_list, unit_decl::name, unit_set_el::next_unit_set_el, and unit_set_el::unit_decl.
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, copy(), error(), unit_decl::excl_list, unit_decl::final_absence_list, unit_decl::final_presence_list, unit_decl::name, pattern_set_el::next_pattern_set_el, unit_set_el::next_unit_set_el, unit_decl::presence_list, unit_set_el::unit_decl, pattern_set_el::unit_decls, pattern_set_el::units_num, w_flag, and warning().
Referenced by process_decls().
|
static |
The function forms `state_reservs' for STATE.
References state::component_states, alt_state::next_sorted_alt_state, state::reservs, and alt_state::state.
Referenced by output_state().
|
static |
The function is called by function pass_states. The function adds STATE to `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, state_ainsn_table::check_vect, state_ainsn_table::comb_vect, state_ainsn_table::full_vect, 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, and ainsn::insn_equiv_class_num.
Referenced by output_trans_table().
|
static |
Allocate new reservation set.
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(), and alt_state::next_sorted_alt_state.
Referenced by form_ainsn_with_same_reservs().
|
static |
The following function adds AUTOMATON to the current list.
References automata_list_el::automaton, current_automata_list, get_free_automata_list_el(), and automata_list_el::next_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, and automata_list_el::next_automata_list_el.
Referenced by initiate_automata_lists().
|
static |
The following function finishes forming the current list, inserts it into the table and returns it.
References free_automata_list().
Referenced by form_important_insn_automata_lists().
|
static |
Hash value of AUTOMATA_LIST.
References automata_list_el::automaton, automaton::automaton_order_num, and automata_list_el::next_automata_list_el.
Referenced by initiate_automata_lists().
|
static |
The following function starts new automata list and makes it the current one.
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 dm_automaton, 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 dm_automaton, 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 can not be changed.
References strlen().
Referenced by 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(), automaton_decl::name, automaton::NDFA_arcs_num, automaton::NDFA_states_num, NDFA_to_DFA(), no_minimization_flag, progress_flag, ticker_off(), and ticker_on().
Referenced by create_automata().
|
static |
This fills in the presence_signature[] member of STATE.
References first_cycle_unit_presence(), state::presence_signature, description::query_units_num, and description::units_num.
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 els_in_cycle_reserv, pattern_reserv::next_pattern_reserv, pattern_reserv::reserv, 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, 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 description::decls, description::decls_num, dm_automaton, error(), 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, description::decls, description::decls_num, dm_reserv, error(), 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 els_in_cycle_reserv, pattern_reserv::next_pattern_reserv, pattern_reserv::reserv, and description::units_num.
Referenced by reserv_sets_are_intersected().
|
static |
The function processes given REGEXP to find units with the wrong distribution.
References unit_decl::automaton_decl, equal_alternatives_p(), error(), unit_decl::last_distribution_check_cycle, marked, memset(), regexp::mode, unit_decl::name, unit_usage::next, 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 check_regexp_units_distribution(), description::decls, description::decls_num, dm_automaton, dm_insn_reserv, 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 description::decls, description::decls_num, dm_reserv, dm_unit, error(), 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 first_out_arc(), and next_out_arc().
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.
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 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().
|
static |
The function copies pointers to equivalent states from vla FROM into vla TO.
Referenced by evaluate_equiv_classes().
|
static |
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 regexp::mode, reserv_decl::regexp, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
Referenced by transform_1(), transform_2(), transform_3(), and transform_insn_regexps().
|
static |
Copy IR structure (node).
References create_node(), and memcpy().
Referenced by build_distinct_type_copy(), build_function_decl_skip_args(), cgraph_create_virtual_clone(), cgraph_function_versioning(), convert_to_integer(), copy_constant(), copy_decl_no_change(), copy_list(), copy_tree_body_r(), copy_tree_r(), expand_expr_addr_expr_1(), expand_simple_operations(), fixup_child_record_type(), gimple_assign_rhs_to_tree(), gimplify_modify_expr_rhs(), gimplify_var_or_parm_decl(), ipa_tm_create_version(), make_overflow_infinity(), merge_attributes(), optimize_compound_literals_in_ctor(), 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(), simplify_replace_tree(), split_complex_args(), strip_offset_1(), substitute_in_expr(), substitute_placeholder_in_expr(), symtab_nonoverwritable_alias(), task_copyfn_remap_type(), try_move_mult_to_index(), vrp_int_const_binop(), and vrp_visit_phi_node().
|
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, automaton::ainsn_list, automaton::collapse_ainsn, curr_ainsn, description::decls, description::decls_num, dm_insn_reserv, ainsn::important_p, ainsn::insn_reserv_decl, decl::mode, and ainsn::next_ainsn.
Referenced by create_automata().
|
static |
Create nodes alt_state for all AUTOMATON insns.
References automaton::ainsn_list, ainsn::alt_states, ainsn::insn_reserv_decl, ainsn::next_ainsn, process_alts_for_forming_states(), ainsn::sorted_alt_states, special_decl_p(), insn_reserv_decl::transformed_regexp, 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(), description::decls, description::decls_num, dm_automaton, enumerate_states(), description::first_automaton, form_ainsn_with_same_reservs(), decl::mode, automaton_decl::name, automaton::next_automaton, progress_flag, set_insn_equiv_classes(), ticker_off(), ticker_on(), units_to_automata_distr(), and units_to_automata_heuristic_distr().
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(), collapse_flag, state::component_states, first_out_arc(), free_state(), get_free_alt_state(), get_free_state(), insert_state(), state::it_was_placed_in_stack_for_DFA_forming, ndfa_flag, alt_state::next_alt_state, next_out_arc(), alt_state::next_sorted_alt_state, remove_arc(), alt_state::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, 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, and state_ainsn_table::min_comb_vect_el_value.
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, dm_reserv, dm_unit, and decl::mode.
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 dm_reserv, dm_unit, decl::mode, and string_hash().
Referenced by initiate_decl_table().
|
static |
The function prints message about unexpected declaration and finish the program.
References decl_name().
|
static |
Referenced by add_name_and_src_coords_attributes(), decl_mode_check_failed(), and gen_subprogram_die().
|
static |
Return string representation of declaration mode MODE.
References dm_absence, dm_automaton, dm_bypass, dm_excl, dm_insn_reserv, dm_presence, dm_reserv, and dm_unit.
|
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, unit_usage::next, 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 description::decls, description::decls_num, dm_unit, exp(), log(), and decl::mode.
Referenced by units_to_automata_heuristic_distr().
|
static |
The function finds equivalent states of AUTOMATON.
References add_achieved_state(), cache_presence(), compare_states_for_equiv(), copy_equiv_class(), 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 description::decls, description::decls_num, dm_insn_reserv, 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 check_all_description(), check_automata_insn_issues(), check_unit_distributions_to_automata(), create_ticker(), description::decls, description::decls_num, dm_unit, form_important_insn_automata_lists(), generate(), have_error, decl::mode, description::normal_decls_num, progress_flag, description::query_units_num, ticker_off(), and transform_insn_regexps().
Referenced by main().
|
static |
The function returns suffix of given file name. The returned string can not be changed.
Referenced by initiate_automaton_gen().
|
static |
The functions returns arc with given characteristics (or NULL if the arc does not exist).
References collapse_flag, first_out_arc(), ainsn::insn_reserv_decl, and next_out_arc().
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, 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, 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 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.
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(), and free().
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, state::reservs, alt_state::state, and test_unit_reserv().
Referenced by cache_presence(), and output_reserved_units_table().
|
static |
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 |
The function returns the first arc starting from STATE.
References state::first_out_arc.
|
static |
BYPASS is a define_bypass decl that includes glob pattern PATTERN. Call FN (BYPASS, INSN, DATA) for each matching instruction INSN.
References description::decls, description::decls_num, dm_insn_reserv, error(), find_insn_decl(), decl::mode, 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, ainsn::insn_reserv_decl, ainsn::next_ainsn, ainsn::next_same_reservs_insn, 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 description::decls, description::decls_num, dm_insn_reserv, first_out_arc(), decl::mode, and next_out_arc().
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(), description::decls, description::decls_num, dm_insn_reserv, description::first_automaton, first_out_arc(), ainsn::important_p, ainsn::insn_reserv_decl, decl::mode, ainsn::next_ainsn, automaton::next_automaton, next_out_arc(), ainsn::next_same_reservs_insn, and pass_states().
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 tailing '\0').
References irp, regexp::mode, insn_reserv_decl::name, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, rm_unit, and strlen().
Referenced by regexp_representation().
|
static |
The following function forms list of reservation sets for given PATTERN_LIST.
References alloc_empty_reserv_sets(), bitmap_set_bit(), first, unit_decl::in_set_p, pattern_reserv::next_pattern_reserv, pattern_set_el::next_pattern_set_el, pattern_reserv::reserv, pattern_set_el::unit_decls, unit_decl::unit_num, and pattern_set_el::units_num.
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(), and description::units_num.
Referenced by make_automaton().
|
static |
The function frees node ALT_STATE.
References first_free_alt_state, and alt_state::next_alt_state.
Referenced by free_alt_states().
|
static |
The function frees list started with node ALT_STATE_LIST.
References free_alt_state(), and alt_state::next_alt_state.
Referenced by free_state().
|
static |
The function frees node ARC.
References first_free_arc.
Referenced by merge_states(), and remove_arc().
|
static |
The function frees list AUTOMATA_LIST.
References free_automata_list_el(), and automata_list_el::next_automata_list_el.
Referenced by automata_list_finish().
|
static |
The function frees node AUTOMATA_LIST_EL.
References first_free_automata_list_el, and automata_list_el::next_automata_list_el.
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, fatal(), ndfa_flag, no_comb_flag, no_minimization_flag, progress_flag, stats_flag, time_flag, v_flag, and w_flag.
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(), dm_automaton, fatal(), get_str_vect(), decl::mode, and decl::pos.
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 dm_bypass, fatal(), get_str_vect(), decl::mode, and decl::pos.
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(), dm_unit, fatal(), get_str_vect(), decl::mode, and decl::pos.
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 dm_excl, fatal(), get_str_vect(), decl::mode, and decl::pos.
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(), dm_insn_reserv, gen_regexp(), decl::mode, and decl::pos.
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 dm_absence, dm_presence, fatal(), get_str_vect(), irp, decl::mode, and decl::pos.
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(), dm_unit, fatal(), get_str_vect(), decl::mode, and decl::pos.
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(), regexp::mode, reserv_str, and rm_allof.
Referenced by gen_regexp_oneof().
|
static |
Parse an element in STR.
References fatal(), gen_regexp_sequence(), len, memcpy(), regexp::mode, reserv_str, rm_nothing, rm_unit, and strlen().
Referenced by gen_regexp_repeat().
|
static |
Parse reservation STR which possibly contains separator '|'.
References fatal(), gen_regexp_allof(), get_str_vect(), regexp::mode, reserv_str, and rm_oneof.
Referenced by gen_regexp_sequence().
|
static |
Parse construction `repeat' in STR.
References fatal(), gen_regexp_el(), get_str_vect(), regexp::mode, reserv_str, and rm_repeat.
Referenced by gen_regexp_allof().
|
static |
Forward declarations of functions used before their definitions, only.
Referenced by gen_regexp(), and gen_regexp_el().
|
static |
Parse reservation STR which possibly contains separator ','.
References fatal(), gen_regexp_oneof(), get_str_vect(), regexp::mode, and rm_sequence.
|
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(), dm_reserv, gen_regexp(), decl::mode, and decl::pos.
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 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().
|
static |
Referenced by reserv_sets_are_intersected().
|
static |
The function sets up and return EXCL_SET which is union of exclusion sets for each unit in IN_SET.
References els_in_cycle_reserv, excl_set, memset(), and description::units_num.
|
static |
The following function returns free node alt_state. It may be new allocated node or node freed earlier.
References first_free_alt_state, alt_state::next_alt_state, alt_state::next_sorted_alt_state, and alt_state::state.
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, and automata_list_el::next_automata_list_el.
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(), state::automaton, state::component_states, curr_unique_state_num, first_free_state, state::first_out_arc, state::it_was_placed_in_stack_for_DFA_forming, state::it_was_placed_in_stack_for_NDFA_forming, memset(), state::next_equiv_class_state, state::reservs, and state::unique_num.
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 irp, n_sep_els(), and next_sep_el().
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 first_out_arc(), and next_out_arc().
Referenced by count_states_and_arcs().
|
static |
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, and state::next_equiv_class_state.
Referenced by evaluate_equiv_classes().
|
static |
Initialization of the abstract data.
Referenced by initiate_states().
|
static |
Initialization of the abstract data.
Referenced by generate().
|
static |
Initialization of the abstract data.
References automata_list_eq_p(), and automata_list_hash().
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, output_description_file, output_description_file_name, output_file, and strlen().
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(), description::decls, description::decls_num, dm_unit, unit_decl::in_set_p, irp, memset(), decl::mode, unit_set_el::next_unit_set_el, unit_set_el::unit_decl, unit_decl::unit_num, 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.
Referenced by generate().
|
static |
References description::decls, description::decls_num, dm_unit, form_reserv_sets_list(), irp, decl::mode, and description::units_num.
Referenced by generate().
|
static |
Initialization of the abstract data.
References alloc_empty_reserv_sets(), description::decls, description::decls_num, dm_unit, initiate_alt_states(), max_cycles_num, description::max_insn_reserv_cycles, decl::mode, state_eq_p(), state_hash(), 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.
Referenced by process_insn_equiv_class(), and set_insn_equiv_classes().
|
static |
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.
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, bypass_decl::out_insn_reserv, bypass_decl::out_pattern, w_flag, and warning().
Referenced by process_bypass_2().
|
static |
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.
Referenced by process_decls().
|
static |
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.
Referenced by process_decls().
|
static |
Insert STATE into the 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 dm_insn_reserv, 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 dm_insn_reserv, decl::mode, and string_hash().
Referenced by initiate_insn_decl_table().
|
static |
Return nonzero value if the deterministic states contains a reservation of the same cpu unit on the same cpu cycle.
References state::automaton, reserv_sets_are_intersected(), and state::reservs.
Referenced by make_automaton().
|
static |
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, dm_reserv, reserv_decl::loop_pass_num, decl::mode, regexp::mode, reserv_decl::regexp, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
Referenced by check_loops_in_regexps().
int main | ( | ) |
References expand_automata(), 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(), have_error, init_rtx_reader_args_cb(), initiate_automaton_gen(), insn_code_number, parse_automata_opt(), progname, read_md_rtx(), 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, 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, curr_state, state::equiv_class_state, first_out_arc(), free_arc(), get_free_alt_state(), get_free_state(), alt_state::next_alt_state, state::next_equiv_class_state, next_out_arc(), alt_state::next_sorted_alt_state, automaton::start_state, alt_state::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(), set_new_cycle_flags(), and vNULL.
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, state::component_states, create_composed_state(), description::decls, description::decls_num, dm_insn_reserv, form_arcs_marked_by_insn(), state::it_was_placed_in_stack_for_DFA_forming, decl::mode, progress_flag, automaton::start_state, and alt_state::state.
Referenced by build_automaton().
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 |
The function returns next out arc after ARC.
|
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.
References irp.
Referenced by get_str_vect().
|
static |
Return number of out arcs of STATE.
References first_out_arc(), and next_out_arc().
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 automata_list_el::automaton, automaton::insn_equiv_classes_num, automaton::min_issue_delay_table_compression_factor, automata_list_el::next_automata_list_el, output_chip_member_name(), output_file, output_min_issue_delay_vect_name(), and output_translate_vect_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 automaton::achieved_states_num, automata_list_el::automaton, comb_vect_p(), automaton::insn_equiv_classes_num, automata_list_el::next_automata_list_el, 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 automaton::trans_table.
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, output_automaton_name(), output_automaton_units(), output_description_file, output_state(), and pass_states().
Referenced by write_automata().
|
static |
The function outputs name of AUTOMATON.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, and automaton_decl::name.
Referenced by output_automaton_descriptions(), and output_statistics().
|
static |
The function outputs units name belonging to AUTOMATON.
References automaton::automaton_order_num, description::decls, description::decls_num, dm_unit, decl::mode, output_description_file, and strlen().
Referenced by output_automaton_descriptions().
|
static |
Output definition of the structure representing current DFA(s) state(s).
References description::first_automaton, automaton::next_automaton, 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, and automaton_decl::name.
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 description::first_automaton, automaton::next_automaton, output_chip_member_name(), output_file, output_reserved_units_table_name(), and description::query_units_num.
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(), and description::units_num.
Referenced by output_reserv_sets().
|
static |
The function outputs PHR interface function `state_dead_lock_p'.
References output_file.
Referenced by write_automata().
|
static |
Form and output vector representing the locked states of AUTOMATON.
References add_states_vect_el(), first_out_arc(), automaton::locked_states, next_out_arc(), state::order_state_num, output_dead_lock_vect_name(), output_file, output_range_type(), 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, and automaton_decl::name.
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, description::decls, description::decls_num, insn_reserv_decl::default_latency, dm_insn_reserv, insn_reserv_decl::insn_num, description::insns_num, decl::mode, description::normal_decls_num, and output_file.
Referenced by write_automata().
|
static |
The function outputs string representation of IR define_reservation and define_insn_reservation.
References description::decls, description::decls_num, dm_bypass, dm_insn_reserv, dm_reserv, dm_unit, bypass_decl::in_pattern, bypass_decl::latency, decl::mode, description::normal_decls_num, 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 output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `dfa_finish'.
References output_file.
Referenced by write_automata().
|
static |
This function outputs `dfa_insn_code' and its helper function `dfa_insn_code_enlarge'.
References output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `dfa_start'.
References output_file.
Referenced by write_automata().
|
static |
The following function outputs function to obtain internal cpu unit code by the cpu unit name.
References free(), memcpy(), output_file, 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 description::decls, description::decls_num, dm_insn_reserv, 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 output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `insn_latency'.
References output_file, and output_internal_insn_code_evaluation().
Referenced by write_automata().
|
static |
Output function `internal_dead_lock'.
References description::first_automaton, automaton::locked_states, automaton::next_automaton, output_chip_member_name(), output_dead_lock_vect_name(), and output_file.
Referenced by write_automata().
|
static |
Output code if (insn != 0) { insn_code = dfa_insn_code (insn); if (insn_code > DFA__ADVANCE_CYCLE) return code; } else insn_code = DFA__ADVANCE_CYCLE; where insn denotes INSN_NAME, insn_code denotes INSN_CODE_NAME, and code denotes CODE.
References collapse_flag, and output_file.
Referenced by output_insn_latency_func(), output_maximal_insn_latency_func(), output_min_insn_conflict_delay_func(), and output_trans_func().
|
static |
Output function `internal_insn_latency'.
References bypass_decl::bypass_guard_name, description::decls, description::decls_num, dm_insn_reserv, bypass_decl::in_insn_reserv, insn_reserv_decl::insn_num, bypass_decl::latency, decl::mode, bypass_decl::next, and output_file.
Referenced by write_automata().
|
static |
Output function `internal_maximum_insn_latency'.
References description::decls, description::decls_num, dm_insn_reserv, bypass_decl::latency, decl::mode, bypass_decl::next, and output_file.
Referenced by write_automata().
|
static |
Output function `internal_min_issue_delay'.
References output_automata_list_min_issue_delay_code(), output_file, and output_insn_code_cases().
Referenced by write_automata().
|
static |
|
static |
Output function `internal_state_transition'.
References output_automata_list_transition_code(), output_file, and output_insn_code_cases().
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 description::decls, description::decls_num, dm_bypass, dm_insn_reserv, 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 output_file, and output_internal_insn_code_evaluation().
Referenced by write_automata().
|
static |
Output function `min_insn_conflict_delay'.
References output_file, and output_internal_insn_code_evaluation().
Referenced by write_automata().
|
static |
|
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(), automaton::ainsn_list, changed, ainsn::first_ainsn_with_given_equivalence_num, first_out_arc(), ainsn::insn_equiv_class_num, automaton::insn_equiv_classes_num, 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_vect(), and pass_states().
Referenced by output_tables().
|
static |
Output name of simple min issue delay table representation.
References automaton::automaton_order_num, automaton::corresponding_automaton_decl, and automaton_decl::name.
Referenced by output_automata_list_min_issue_delay_code(), and output_min_issue_delay_table().
|
static |
Output patterns in LIST separated by comma.
References unit_decl::name, pattern_set_el::next_pattern_set_el, output_description_file, pattern_set_el::unit_decls, and pattern_set_el::units_num.
Referenced by output_description().
|
static |
The function outputs PHR interface function `print_reservation'.
References collapse_flag, description::decls, dm_insn_reserv, finish_regexp_representation(), description::insns_num, decl::mode, description::normal_decls_num, output_file, 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 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(), first_cycle_unit_presence(), state::order_state_num, output_file, output_range_type(), output_reserved_units_table_name(), output_vect(), pass_states(), unit_decl::query_num, description::query_units_num, 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, and automaton_decl::name.
Referenced by output_cpu_unit_reservation_p(), and output_reserved_units_table().
|
static |
The function outputs PHR interface function `state_reset'.
References output_file.
Referenced by write_automata().
|
static |
The function outputs PHR interface function `state_size'.
References output_file.
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(), state::new_cycle_p, state::order_state_num, output_description_file, output_reserv_sets(), output_state_arcs(), remove_state_duplicate_reservs(), and state_reservs_cmp().
Referenced by output_automaton_descriptions().
|
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(), ainsn::insn_equiv_class_num, ainsn::insn_reserv_decl, insn_reserv_decl::name, next_out_arc(), ainsn::next_same_reservs_insn, output_description_file, and strlen().
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 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, 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 collapse_flag, description::first_automaton, insn_reserv_decl::insn_num, automaton::next_automaton, 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 ndfa_flag, and print_active_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, and automaton_decl::name.
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, and automaton_decl::name.
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, and automaton_decl::name.
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, and automaton_decl::name.
Referenced by output_automata_list_transition_code(), and output_trans_table().
|
static |
The function outputs PHR interface function `state_transition'.
References output_file, and output_internal_insn_code_evaluation().
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(), first_out_arc(), next_out_arc(), output_state_ainsn_table(), output_trans_base_vect_name(), output_trans_check_vect_name(), output_trans_comb_vect_name(), output_trans_full_vect_name(), pass_states(), and automaton::trans_table.
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, 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, and automaton_decl::name.
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 unit_decl::name, unit_set_el::next_unit_set_el, output_description_file, and unit_set_el::unit_decl.
Referenced by output_description().
|
static |
The function outputs all initialization values of VECT.
References 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, fatal(), ndfa_flag, no_minimization_flag, progress_flag, stats_flag, time_flag, v_flag, and w_flag.
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(), curr_state, state::equiv_class_num_1, state::equiv_class_num_2, state::next_equiv_class_state, 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(), and state::pass_num.
Referenced by pass_states().
|
static |
This recursive function passes all states of AUTOMATON and applies APPLIED_FUNC to them.
References 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, finish_forming_alt_state(), get_free_alt_state(), get_free_state(), regexp::mode, alt_state::next_alt_state, process_seq_for_forming_states(), rm_oneof, alt_state::state, and state_being_formed.
Referenced by create_alt_states().
|
static |
Process define_bypass decl BYPASS, inserting a bypass for each specific pair of insn reservations.
References for_each_matching_insn(), bypass_decl::in_pattern, and process_bypass_1().
Referenced by process_decls().
A subroutine of process_bypass that is called for each input instruction IN_INSN_RESERV.
References for_each_matching_insn(), bypass_decl::out_pattern, and process_bypass_2().
Referenced by process_bypass().
|
static |
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, 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(), 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(), bypass_decl::in_pattern, insert_automaton_decl(), insert_decl(), insert_insn_decl(), description::insns_num, bypass_decl::latency, decl::mode, names, 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 dm_unit, error(), find_decl(), decl::mode, unit_set_el::next_unit_set_el, and unit_set_el::unit_decl.
Referenced by process_decls().
|
static |
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(), insert_ainsn_into_equiv_class(), insn_reserv_decl::insn_num, ainsn::insn_reserv_decl, ainsn::next_equiv_class_insn, and next_insn().
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 dm_unit, error(), find_decl(), decl::mode, unit_set_el::next_unit_set_el, and unit_set_el::unit_decl.
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 dm_unit, error(), find_decl(), decl::mode, pattern_set_el::next_pattern_set_el, pattern_set_el::unit_decls, and pattern_set_el::units_num.
Referenced by process_decls().
|
static |
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 dm_reserv, dm_unit, error(), find_decl(), decl::mode, regexp::mode, regexp::pos, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
Referenced by process_regexp_decls().
|
static |
The function recursively processes IR of reservation and defines max and min cycle for reservation of unit.
References unit_decl::max_occ_cycle_num, unit_decl::min_occ_cycle_num, regexp::mode, reserv_decl::regexp, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
Referenced by evaluate_max_reserv_cycles().
|
static |
The following function processes regexp of define_reservation and define_insn_reservation with the aid of function `process_regexp'.
References description::decls, description::decls_num, dm_insn_reserv, dm_reserv, 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, regexp::mode, rm_allof, rm_nothing, rm_sequence, rm_unit, set_state_reserv(), and unit_decl::unit_num.
Referenced by process_alts_for_forming_states().
|
static |
The function processes STATE in order to find equivalent ainsns.
References first_out_arc(), free(), description::insns_num, next_out_arc(), and process_insn_equiv_class().
Referenced by set_insn_equiv_classes().
|
static |
The function prints message about unexpected regexp and finish the program.
References regexp_name().
|
static |
Referenced by regexp_mode_check_failed().
|
static |
Return string representation of regexp mode MODE.
References rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_reserv, rm_sequence, and rm_unit.
|
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().
The function traverses IR of reservation and applies transformations implemented by FUNC.
References regexp::mode, rm_allof, rm_nothing, rm_oneof, rm_repeat, rm_sequence, and rm_unit.
Referenced by transform_regexp().
|
static |
The function removes and frees ARC staring from FROM_STATE.
References state::first_out_arc, free_arc(), 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 reserv_sets_cmp().
Referenced by output_state().
|
static |
AND of the reservation sets.
References els_in_reservs.
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, get_excl_set(), and reserv_sets_or().
Referenced by intersected_state_reservs_p().
|
static |
Comparison of given reservation sets.
References els_in_reservs.
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 |
|
static |
OR of the reservation sets.
References els_in_reservs.
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_reservs.
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, insert_ainsn_into_equiv_class(), ainsn::insn_equiv_class_num, automaton::insn_equiv_classes_num, ainsn::next_ainsn, ainsn::next_equiv_class_insn, ainsn::next_same_reservs_insn, 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 first_out_arc(), and next_out_arc().
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 first_out_arc(), and next_out_arc().
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().
Referenced by form_reservs_matter(), and set_state_reserv().
|
static |
True if DECL is either of the two special decls we created.
References collapse_flag.
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, 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 automaton::automaton_order_num, alt_state::next_sorted_alt_state, 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 first_out_arc(), next_out_arc(), state::num_out_arcs, state::presence_signature, description::query_units_num, and si.
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(), 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 unit_decl::last_distribution_check_cycle, regexp::mode, unit_usage::next, 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().
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().
|
static |
The function makes transformation A*N -> A, A, ...
References copy_insn_regexp(), regexp::mode, regexp::pos, regexp::regexp, rm_repeat, and rm_sequence.
Referenced by transform_regexp().
|
static |
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(), regexp::mode, regexp::pos, rm_allof, rm_oneof, and rm_sequence.
Referenced by transform_regexp().
|
static |
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(), regexp::mode, regexp::pos, rm_allof, rm_nothing, rm_oneof, rm_sequence, and rm_unit.
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(), description::decls, dm_insn_reserv, decl::mode, description::normal_decls_num, progress_flag, ticker_off(), and transform_regexp().
Referenced by expand_automata().
|
static |
The function applies all transformations for IR representation of reservation REGEXP.
References regexp_transform_func(), 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(), and alt_state::next_alt_state.
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, 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, description::decls, description::decls_num, dm_unit, and decl::mode.
Referenced by create_automata().
|
static |
The function makes heuristic assigning automata to units. Actually efficacy of the algorithm has been checked yet???
References compare_max_occ_cycle_nums(), unit_decl::corresponding_automaton_num, description::decls, description::decls_num, dm_unit, estimate_one_automaton_bound(), free(), unit_decl::max_occ_cycle_num, decl::mode, 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 create_ticker(), errno, fatal(), finish_arcs(), finish_automata_lists(), finish_automaton_decl_table(), finish_decl_table(), finish_insn_decl_table(), finish_states(), have_error, irp, 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_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().
The following vla is used for storing pointers to all achieved states.
|
static |
Referenced by print_time().
|
static |
The following variables is maximal number of allocated nodes alt_state.
|
static |
The following variables is maximal number of allocated nodes `arc'.
|
static |
The following variables is maximal number of allocated nodes `state'.
|
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.
|
static |
Hash table of 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().
|
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().
|
static |
The following vla is used for storing pointers to all achieved states.
|
static |
The following variable values are times of all checking all generation all pipeline hazard translator work
|
static |
When making an NDFA, produce additional transitions that collapse NDFA state into a deterministic one suitable for querying CPU units. Provide avance-state transitions only for deterministic states.
Referenced by create_composed_state(), find_arc(), gen_automata_option(), NDFA_to_DFA(), output_default_latencies(), output_internal_insn_code_evaluation(), output_print_reservation_func(), output_tables(), parse_automata_opt(), special_decl_p(), and transform_insn_regexps().
|
static |
Pseudo insn decl which denotes collapsing the NDFA state.
Referenced by add_collapse_ndfa_insn_decl().
|
static |
The following variable value is current automaton insn for whose reservation the alt states are created.
Referenced by create_ainsns(), and form_ainsn_with_same_reservs().
|
static |
Referenced by count_states_and_arcs().
|
static |
Values of two variables are counted number of states and arcs in an automaton.
Referenced by count_states_and_arcs().
|
static |
The following variable value is number of reservation being processed on loop recognition.
Referenced by check_loops_in_regexps(), and loop_in_regexp().
|
static |
The following variable value is current number (1, 2, ...) of passing graph of states.
Referenced by pass_state_graph().
|
static |
The page contains code for enumeration of all states of an automaton.
Variable used for enumeration of all states of an automaton. Its value is current number of automaton states.
Referenced by enumerate_states(), and set_order_state_num().
|
static |
Referenced by get_free_state().
|
static |
The list being formed.
Referenced by automata_list_add().
|
static |
VLA for representation of array of pointers to unit usage structures. There is an element for each combination of (alternative number, cycle). Unit usages on given cycle in alternative with given number are referred through element with index equals to the cycle * number of all alternatives in the regexp + the alternative number.
|
static |
The declaration table itself is represented by the following variable.
Referenced by copy_decls_for_unworthy_types(), find_decl(), finish_decl_table(), initiate_decl_table(), and insert_decl().
Pointers to all declarations during IR generation are stored in the following.
|
static |
Value of the following variable is node representing description being processed. This is start point of IR.
|
static |
Number of set elements (see type set_el_t) needed for representation of one cycle reservation. It is depended on units number.
Referenced by check_absence_pattern_sets(), check_presence_pattern_sets(), get_excl_set(), and reserv_sets_are_intersected().
|
static |
Number of set elements (see type set_el_t) needed for representation of maximal length reservation. Deterministic reservation is stored as set (bit string) of length equal to the variable value * number of bits in set_el_t.
Referenced by reserv_sets_and(), reserv_sets_are_intersected(), reserv_sets_cmp(), reserv_sets_hash_value(), reserv_sets_or(), and reserv_sets_shift().
|
static |
|
static |
The page contains abstract data for work with exclusion sets (see exclusion_set in file rtl.def).
The following variable refers to an exclusion set returned by get_excl_set. This is bit string of length equal to cpu units number. If exclusion set for given unit contains 1 for a unit, then simultaneous reservation of the units is prohibited.
Referenced by get_excl_set().
|
static |
Abstract data `alternative states' which represents nondeterministic nature of the description (see comments for structures alt_state and state).
List of free states.
Referenced by free_alt_state(), and get_free_alt_state().
|
static |
|
static |
Abstract data `automata lists'.
List of free states.
Referenced by free_automata_list_el(), and get_free_automata_list_el().
|
static |
Linked list of free 'state' structures to be recycled. The next_equiv_class_state pointer is borrowed for a free list.
Referenced by free_state(), and get_free_state().
|
static |
|
static |
The insn declaration table itself is represented by the following variable. The table does not contain insn reservation declarations.
Referenced by find_insn_decl(), finish_insn_decl_table(), initiate_insn_decl_table(), and insert_insn_decl().
|
static |
All IR is stored in the following obstack.
Referenced by alloc_empty_reserv_sets(), create_node(), finish_regexp_representation(), form_regexp(), gen_presence_absence_set(), get_str_vect(), initiate_automaton_gen(), initiate_excl_sets(), initiate_presence_absence_pattern_sets(), next_sep_el(), regexp_representation(), and write_automata().
|
static |
This page contains abstract data `state'.
Maximal length of reservations in cycles (>= 1).
Referenced by form_reservs_matter(), initiate_states(), and output_reserv_sets().
|
static |
|
static |
The following flags are set up by function `initiate_automaton_gen'.
Make automata with nondeterministic reservation by insns (`-ndfa').
Referenced by create_composed_state(), gen_automata_option(), make_automaton(), output_time_statistics(), and parse_automata_opt().
|
static |
|
static |
|
static |
Do not try to generate a comb vector (`-no-comb-vect').
Referenced by add_vect(), comb_vect_p(), and gen_automata_option().
|
static |
Do not make minimization of DFA (`-no-minimization').
Referenced by build_automaton(), gen_automata_option(), output_statistics(), and parse_automata_opt().
|
static |
Undefined position.
Referenced by add_advance_cycle_insn_decl(), and add_collapse_ndfa_insn_decl().
|
static |
Description file of PHR. The value is NULL if the file is not created.
Referenced by initiate_automaton_gen(), output_automaton_descriptions(), output_automaton_units(), output_description(), output_pattern_set_el_list(), output_regexp(), output_state(), output_state_arcs(), output_unit_set_el_list(), and write_automata().
|
static |
PHR description file name.
Referenced by initiate_automaton_gen(), and write_automata().
|
static |
Output file for pipeline hazard recognizer (PHR) being generated. The value is NULL if the file is not defined.
Referenced by initiate_automaton_gen(), output_automata_list_min_issue_delay_code(), output_automata_list_transition_code(), output_chip_definitions(), output_cpu_unit_reservation_p(), output_dead_lock_func(), output_dead_lock_vect(), output_default_latencies(), output_dfa_clean_insn_cache_func(), output_dfa_finish_func(), output_dfa_insn_code_func(), output_dfa_start_func(), output_get_cpu_unit_code_func(), output_insn_code_cases(), output_insn_has_dfa_reservation_p(), output_insn_latency_func(), output_internal_dead_lock_func(), output_internal_insn_code_evaluation(), 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_min_issue_delay_table(), output_print_reservation_func(), output_reserved_units_table(), output_reset_func(), output_size_func(), output_state_ainsn_table(), output_tables(), output_trans_func(), output_translate_vect(), output_vect(), and write_automata().
|
static |
|
static |
Flag of output of a progress bar showing how many states were generated so far for automaton being processed (`-progress').
Referenced by build_automaton(), check_unit_distributions_to_automata(), create_automata(), expand_automata(), gen_automata_option(), make_automaton(), NDFA_to_DFA(), parse_automata_opt(), transform_insn_regexps(), and write_automata().
|
static |
The following variable is set up 1 if a transformation has been applied.
|
static |
The following string contains original reservation string being parsed.
Referenced by gen_regexp(), gen_regexp_allof(), gen_regexp_el(), gen_regexp_oneof(), and gen_regexp_repeat().
|
static |
Value of this variable is number of automata being generated. The actual number of automata may be less this value if there is not sufficient number of units. This value is defined by argument of option `-split' or by constructions automaton if the value is zero (it is default value of the argument).
Referenced by generate().
|
static |
The page contains code for building alt_states (see comments for IR) describing all possible insns reservations of an automaton.
Current state being formed for which the current alt_state refers.
Referenced by process_alts_for_forming_states().
|
static |
The following variable is used for forming array of all possible cpu unit reservations described by the current DFA state.
|
static |
The state table itself is represented by the following variable.
|
static |
Flag of automata statistics (`-stats').
Referenced by gen_automata_option(), parse_automata_opt(), and write_automata().
|
static |
Temporary reservation of maximal length.
|
static |
Flag of output time statistics (`-time').
Referenced by gen_automata_option(), parse_automata_opt(), and write_automata().
|
static |
The following variable values are times of o transformation of regular expressions o building NDFA (DFA if !ndfa_flag) o NDFA -> DFA (simply the same automaton if !ndfa_flag) o DFA minimization o building insn equivalence classes o all previous ones o code output
|
static |
The value in a table state x ainsn -> something which represents undefined value.
Referenced by add_vect().
|
static |
|
static |
The array contains exclusion sets for each unit.
|
static |
|
static |
|
static |
The page contains abstract data for work with presence/absence pattern sets (see presence_set/absence_set in file rtl.def).
The following arrays contain correspondingly presence, final presence, absence, and final absence patterns for each unit.
|
static |
Obstack for unit_usage structures.
Referenced by check_regexp_units_distribution(), and store_alt_unit_usage().
|
static |
Array of pointers to unit declarations.
|
static |
Flag of creation of description file which contains description of result automaton and statistics information (`-v').
Referenced by gen_automata_option(), parse_automata_opt(), and write_automata().
|
static |
Flag of generating warning instead of error for non-critical errors (`-w').
Referenced by add_presence_absence(), check_automata_insn_issues(), check_automaton_usage(), check_usage(), gen_automata_option(), insert_bypass(), parse_automata_opt(), and process_decls().
|
static |
The following variable value is node representing automaton declaration. The node used for searching automaton declaration with given name.
Referenced by find_automaton_decl(), and initiate_automaton_decl_table().
|
static |
The following variable value is node representing declaration. The node used for searching declaration with given name.
Referenced by find_decl(), and initiate_decl_table().
|
static |
The following variable value is node representing insn reservation declaration. The node used for searching insn reservation declaration with given name.
Referenced by find_insn_decl(), and initiate_insn_decl_table().