#include "hconfig.h"#include "system.h"#include "rtl.h"#include "errors.h"#include "gensupport.h"

Go to the source code of this file.
| #define NUM_KNOWN_PREDS ARRAY_SIZE (preds) |
| #define NUM_SPECIAL_MODE_PREDS ARRAY_SIZE (special_mode_pred_table) |
| #define OUTPUT_LABEL | ( | INDENT_STRING, | |||
| LABEL_NUMBER | ) | printf("%sL%d: ATTRIBUTE_UNUSED_LABEL\n", (INDENT_STRING), (LABEL_NUMBER)) |
| #define SUBROUTINE_THRESHOLD 100 |
| enum routine_type |
Definition at line 152 of file genrecog.c.
| static struct decision* add_to_sequence | ( | rtx | pattern, | |
| struct decision_head * | last, | |||
| const char * | position, | |||
| enum routine_type | insn_type, | |||
| int | top | |||
| ) | [static, read] |
Definition at line 772 of file genrecog.c.
References abort, base, decision_test::code, pred_table::codes, codes, decision_test::DT_accept_op, decision_test::DT_code, decision_test::DT_dup, decision_test::DT_elt_one_int, decision_test::DT_elt_zero_int, decision_test::DT_elt_zero_wide, decision_test::DT_elt_zero_wide_safe, decision_test::DT_mode, decision_test::DT_pred, decision_test::DT_veclen, decision_test::DT_veclen_ge, decision_test::dup, decision_head::first, free(), GET_CODE, GET_MODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, int, decision_test::intval, decision_head::last, len, max_depth, decision_test::mode, mode, new_decision(), new_decision_test(), NULL, NUM_KNOWN_PREDS, decision_test::opno, PEEPHOLE2, decision_test::pred, preds, ret, RTX_CODE, size_t, strcmp(), strcpy, strlen(), sub, decision::success, decision_test::u, UNKNOWN, decision_test::veclen, XEXP, XINT, xmalloc(), XSTR, XVECEXP, XVECLEN, and XWINT.
Referenced by add_to_sequence(), and make_insn_sequence().
| static int break_out_subroutines | ( | struct decision_head * | head, | |
| int | initial | |||
| ) | [static] |
Definition at line 1621 of file genrecog.c.
References decision::next, next_subroutine_number, size, sub, SUBROUTINE_THRESHOLD, and decision::success.
Referenced by break_out_subroutines(), and process_tree().
| static void change_state | ( | char * | oldpos, | |
| const char * | newpos, | |||
| struct decision * | afterward, | |||
| const char * | indent | |||
| ) | const [static] |
Definition at line 1692 of file genrecog.c.
References ISLOWER, ISUPPER, decision::number, printf(), strlen(), and strncmp().
Referenced by write_afterward(), and write_tree().
Definition at line 2886 of file genrecog.c.
Definition at line 2863 of file genrecog.c.
References debug_decision_1(), decision_head::first, fputs(), n, decision::next, NULL, putc(), and decision::success.
Referenced by debug_decision(), debug_decision_0(), and debug_decision_list().
Definition at line 2828 of file genrecog.c.
References debug_decision_2(), fprintf(), fputs(), decision_test::next, NULL, and putc().
Referenced by debug_decision_0().
| static void debug_decision_2 | ( | struct decision_test * | test | ) | [static] |
Definition at line 2768 of file genrecog.c.
References abort, fprintf(), GET_MODE_NAME, GET_RTX_NAME, HOST_WIDE_INT_PRINT_DEC, memcpy, strncpy(), and sub.
Referenced by debug_decision_1().
Definition at line 2893 of file genrecog.c.
| static void factor_tests | ( | struct decision_head * | head | ) | [static] |
Definition at line 1497 of file genrecog.c.
References first, decision_head::first, decision_head::last, merge_trees(), new_decision(), next, decision::next, decision_test::next, NULL, decision::position, decision::prev, decision::success, decision::tests, and decision_test::type.
Referenced by factor_tests(), and process_tree().
| static void find_afterward | ( | struct decision_head * | head, | |
| struct decision * | real_afterward | |||
| ) | [static] |
Definition at line 1643 of file genrecog.c.
References decision::afterward, decision_head::first, maybe_both_true(), decision::need_label, decision::next, NULL, p, q, decision::subroutine_number, and decision::success.
Referenced by find_afterward(), and process_tree().
Definition at line 416 of file genrecog.c.
References abort, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, NULL, r, RTX_CODE, XEXP, XSTR, XVEC, XVECEXP, and XVECLEN.
Referenced by find_matching_operand(), and validate_pattern().
Definition at line 361 of file genrecog.c.
References abort, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, NULL, NULL_RTX, r, RTX_CODE, XEXP, XINT, XVEC, XVECEXP, and XVECLEN.
Referenced by find_operand(), and validate_pattern().
| const char* get_insn_name | ( | int code | ) |
| static int is_unconditional | ( | struct decision_test * | t, | |
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2147 of file genrecog.c.
References abort, PEEPHOLE2, RECOG, and SPLIT.
Referenced by write_node().
| int main | ( | int argc | , | |
| char ** | argv | |||
| ) |
Definition at line 2658 of file genrecog.c.
References error_count, fatal(), FATAL_EXIT_CODE, ferror(), fflush(), GET_CODE, init_md_reader_args(), make_insn_sequence(), memset, merge_trees(), next_index, next_insn_code, NULL, pattern_lineno, PEEPHOLE2, process_tree(), progname, puts(), read_md_rtx(), RECOG, SPLIT, SUCCESS_EXIT_CODE, and write_header().
| static struct decision_head make_insn_sequence | ( | rtx | insn, | |
| enum routine_type | type | |||
| ) | [static, read] |
Definition at line 1213 of file genrecog.c.
References abort, decision_head::first, maybe_both_true_1(), decision::next, p1, p2, strcmp(), and decision::success.
Referenced by find_afterward(), maybe_both_true(), and merge_trees().
| static int maybe_both_true_1 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1178 of file genrecog.c.
References decision_test::DT_accept_op, maybe_both_true_2(), decision_test::next, t1, and t2.
Referenced by maybe_both_true().
| static int maybe_both_true_2 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1067 of file genrecog.c.
References c, pred_table::codes, decision_test::DT_code, decision_test::DT_elt_one_int, decision_test::DT_elt_zero_int, decision_test::DT_elt_zero_wide, decision_test::DT_elt_zero_wide_safe, decision_test::DT_mode, decision_test::DT_pred, decision_test::DT_veclen, decision_test::DT_veclen_ge, preds, RTX_CODE, strcmp(), and tmp.
Referenced by maybe_both_true_1().
Definition at line 1367 of file genrecog.c.
References add, decision_test::DT_accept_insn, error_count, get_insn_name(), decision_test::insn, message_with_line(), decision_test::next, NULL, decision_test::type, and decision_test::u.
Referenced by merge_trees().
| static void merge_trees | ( | struct decision_head * | oldh, | |
| struct decision_head * | addh | |||
| ) | [static] |
Definition at line 1412 of file genrecog.c.
References abort, add, maybe_both_true(), merge_accept_insn(), next, decision::next, nodes_identical(), NULL, decision::prev, strcmp(), decision::success, decision::tests, and decision_test::type.
Referenced by factor_tests(), main(), make_insn_sequence(), and merge_trees().
| static struct decision* new_decision | ( | char * | position, | |
| struct decision_head * | last | |||
| ) | const [static, read] |
Definition at line 321 of file genrecog.c.
References decision_head::first, decision_head::last, memset, next_number, xmalloc(), and xstrdup().
Referenced by add_to_sequence(), factor_tests(), and make_insn_sequence().
| static struct decision_test* new_decision_test | ( | enum decision_type | type, | |
| struct decision_test *** | pplace | |||
| ) | [static, read] |
Definition at line 340 of file genrecog.c.
References decision_test::next, decision_test::type, and xmalloc().
Referenced by add_to_sequence(), and make_insn_sequence().
Definition at line 1330 of file genrecog.c.
References decision_test::next, nodes_identical_1(), strcmp(), t1, t2, and decision_test::type.
Referenced by merge_trees().
| static int nodes_identical_1 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1282 of file genrecog.c.
References abort, and strcmp().
Referenced by nodes_identical(), and write_switch().
| int main PARAMS | ( | (int, char **) | ) |
| static void debug_decision_2 PARAMS | ( | (struct decision_test *) | ) | [static] |
| static void record_insn_name PARAMS | ( | (int, const char *) | ) | [static] |
| static struct decision_head make_insn_sequence PARAMS | ( | (rtx, enum routine_type) | ) | [static, read] |
Definition at line 77 of file cplus-dem.c.
| static void write_subroutine PARAMS | ( | (struct decision_head *, enum routine_type) | ) | [static] |
| static void write_tree PARAMS | ( | (struct decision_head *, const char *, enum routine_type, int) | ) | [static] |
| static void write_tree_1 PARAMS | ( | (struct decision_head *, int, enum routine_type) | ) | [static] |
| static int write_node PARAMS | ( | (struct decision *, int, enum routine_type) | ) | [static] |
| static int is_unconditional PARAMS | ( | (struct decision_test *, enum routine_type) | ) | [static] |
| static void write_action PARAMS | ( | (struct decision *, struct decision_test *, int, int, struct decision *, enum routine_type) | ) | [static] |
| static void write_cond PARAMS | ( | (struct decision_test *, int, enum routine_type) | ) | [static] |
| static void write_afterward PARAMS | ( | (struct decision *, struct decision *, const char *) | ) | [static] |
| static void change_state PARAMS | ( | (const char *, const char *, struct decision *, const char *) | ) | [static] |
| static void find_afterward PARAMS | ( | (struct decision_head *, struct decision *) | ) | [static] |
| static int break_out_subroutines PARAMS | ( | (struct decision_head *, int) | ) | [static] |
| static void factor_tests PARAMS | ( | (struct decision_head *) | ) | [static] |
| static void merge_trees PARAMS | ( | (struct decision_head *, struct decision_head *) | ) | [static] |
| static int maybe_both_true_2 PARAMS | ( | (struct decision_test *, struct decision_test *) | ) | [static] |
| static struct decision* add_to_sequence PARAMS | ( | (rtx, struct decision_head *, const char *, enum routine_type, int) | ) | [static, read] |
| static struct decision_test* new_decision_test PARAMS | ( | (enum decision_type, struct decision_test ***) | ) | [static, read] |
| static struct decision* new_decision PARAMS | ( | (const char *, struct decision_head *) | ) | [static, read] |
| static void process_tree | ( | struct decision_head * | head, | |
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2626 of file genrecog.c.
References break_out_subroutines(), factor_tests(), find_afterward(), next_subroutine_number, NULL, PEEPHOLE2, simplify_tests(), write_subroutine(), and write_subroutines().
Referenced by main().
| static void record_insn_name | ( | int | code, | |
| const char * | name | |||
| ) | [static] |
Definition at line 2734 of file genrecog.c.
References insn_name_ptr, insn_name_ptr_size, memset, sprintf(), strlen(), xmalloc(), xrealloc(), and xstrdup().
| static void simplify_tests | ( | struct decision_head * | head | ) | [static] |
Definition at line 1583 of file genrecog.c.
References a, b, decision_test::DT_code, decision_test::DT_mode, decision_test::DT_pred, decision::next, decision_test::next, NULL, decision::success, decision::tests, and decision_test::type.
Referenced by process_tree(), and simplify_tests().
Definition at line 471 of file genrecog.c.
References abort, ADDRESSOF, c, pred_table::codes, CONCAT, CONST, dest, error_count, find_matching_operand(), find_operand(), GET_CODE, GET_MODE, GET_MODE_NAME, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, MEM, message_with_line(), NULL, NULL_RTX, NUM_KNOWN_PREDS, NUM_SPECIAL_MODE_PREDS, pattern_lineno, PC, preds, REG, RTX_CODE, rtx_name, SET, SET_DEST, SET_SRC, special_mode_pred_table, src, strcmp(), strstr(), XEXP, XINT, XSTR, XVECEXP, and XVECLEN.
Referenced by make_insn_sequence(), and validate_pattern().
| static void write_action | ( | struct decision * | p, | |
| struct decision_test * | test, | |||
| int | depth, | |||
| int | uncond, | |||
| struct decision * | success, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2056 of file genrecog.c.
References abort, fputs(), i, indent, decision_test::insn, ISUPPER, decision::need_label, decision_test::next, decision::number, decision_test::opno, PEEPHOLE2, printf(), RECOG, SPLIT, strlen(), decision_test::type, and decision_test::u.
Referenced by write_node().
| static void write_afterward | ( | struct decision * | start, | |
| struct decision * | afterward, | |||
| const char * | indent | |||
| ) | [static] |
Definition at line 1764 of file genrecog.c.
References change_state(), NULL, decision::number, decision::position, printf(), and decision::subroutine_number.
Referenced by write_switch(), and write_tree_1().
| static void write_cond | ( | struct decision_test * | p, | |
| int | depth, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 1981 of file genrecog.c.
References abort, GET_MODE_NAME, HOST_WIDE_INT_PRINT_DEC_C, print_code(), printf(), and RECOG.
Referenced by write_node().
| static int write_node | ( | struct decision * | p, | |
| int | depth, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2176 of file genrecog.c.
References is_unconditional(), decision_test::next, NULL, printf(), write_action(), and write_cond().
Referenced by write_tree_1().
| static void write_subroutine | ( | struct decision_head * | head, | |
| enum routine_type | type | |||
| ) | [static] |
Definition at line 2311 of file genrecog.c.
References i, IS_SPLIT, max_depth, PEEPHOLE2, printf(), RECOG, SPLIT, sprintf(), strcpy, and write_tree().
Referenced by process_tree(), and write_subroutines().
| static void write_subroutines | ( | struct decision_head * | head, | |
| enum routine_type | type | |||
| ) | [static] |
Definition at line 2378 of file genrecog.c.
References decision_head::first, decision::next, p, decision::success, and write_subroutine().
Referenced by process_tree(), and write_subroutines().
Definition at line 1782 of file genrecog.c.
References abort, c, decision_test::code, pred_table::codes, decision_head::first, GET_MODE_NAME, HOST_WIDE_INT_PRINT_DEC_C, indent, int, decision_test::intval, memset, decision_test::mode, decision::need_label, decision::next, decision_test::next, nodes_identical_1(), NULL, NUM_RTX_CODE, decision::number, p, decision_test::pred, preds, print_code(), printf(), q, ret, RTX_CODE, decision::success, decision::tests, decision_test::type, decision_test::u, decision_test::veclen, and write_afterward().
Referenced by write_tree_1().
| static void write_tree | ( | struct decision_head * | head, | |
| const char * | prevpos, | |||
| enum routine_type | type, | |||
| int | initial | |||
| ) | [static] |
Definition at line 2251 of file genrecog.c.
References decision::afterward, change_state(), decision_head::first, IS_SPLIT, decision::need_label, decision::next, NULL, decision::number, OUTPUT_LABEL, p, decision::position, printf(), putchar(), strlen(), decision::subroutine_number, decision::success, and write_tree_1().
Referenced by MIR_Replace(), write_subroutine(), and write_tree().
| static void write_tree_1 | ( | struct decision_head * | head, | |
| int | depth, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2215 of file genrecog.c.
References decision::need_label, next, decision::next, decision::number, OUTPUT_LABEL, p, write_afterward(), write_node(), and write_switch().
Referenced by write_tree().
int error_count [static] |
Definition at line 180 of file genrecog.c.
char** insn_name_ptr = 0 [static] |
Definition at line 68 of file genrecog.c.
int insn_name_ptr_size = 0 [static] |
Definition at line 69 of file genrecog.c.
int max_depth [static] |
Definition at line 174 of file genrecog.c.
Referenced by add_to_sequence(), cgraph_decide_recursive_inlining(), Compute_loop_depth_rec(), Shackle_Do_Depth_For_If(), REGION_TREE::Statistic(), and write_subroutine().
int next_index [static] |
Definition at line 169 of file genrecog.c.
int next_insn_code [static] |
int next_number [static] |
int next_subroutine_number [static] |
Definition at line 146 of file genrecog.c.
Referenced by break_out_subroutines(), and process_tree().
int pattern_lineno [static] |
Definition at line 177 of file genrecog.c.
Referenced by add_to_sequence(), compute_predicate_codes(), main(), make_insn_sequence(), and validate_pattern().
struct pred_table preds[] [static] |
Referenced by RGN_CFLOW_MGR::_acquire_cflow_info(), RGN_CFLOW_MGR::_compute_node_level(), REGIONAL_CFG::Add_BBS_And_Edges(), FB_CFG::Add_edge(), add_to_sequence(), FB_CFG::Adjust_edge(), CG_LOOP::Attach_Prolog_And_Epilog(), REGIONAL_CFG::BB_Not_Suit_Duplicate(), BB_REGION::BB_REGION(), Calc_Latency_To(), calculate_live_on_exit(), CG_LOOP_Coalesce_Backedges(), CGTARG_Analyze_Branch(), Check_If_Should_Align_BB(), emit_to_new_bb_before(), DAG_BUILDER::Find_Ancestor_BB(), fix_phi_uses(), hybrid_search(), Init_Edges(), IPO_Clone(), Is_Region(), live_worklist(), LOOP_DESCR_Can_Retarget_Loop_Entrances(), LOOP_DESCR_Find_Unique_Tail(), LOOP_DESCR_Retarget_Loop_Entrances(), maybe_both_true_2(), BB_NODE::Nth_pred(), Perform_Interprocedural_Analysis(), BB_NODE::Replace_pred(), retarget_loop_exits(), split_edge(), REGIONAL_CFG::Tail_Duplicate(), unwind_frame(), REGIONAL_CFG::Update_BB_Prof_Info(), validate_pattern(), and write_switch().
const char* const special_mode_pred_table[] [static] |
Initial value:
{
"pmode_register_operand"
}
Definition at line 224 of file genrecog.c.
Referenced by validate_pattern().
1.5.6