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

Go to the source code of this file.
Definition at line 158 of file genrecog.c.
| #define NUM_KNOWN_PREDS ARRAY_SIZE (preds) |
Definition at line 224 of file genrecog.c.
| #define NUM_SPECIAL_MODE_PREDS ARRAY_SIZE (special_mode_pred_table) |
Definition at line 233 of file genrecog.c.
| #define OUTPUT_LABEL | ( | INDENT_STRING, | |||
| LABEL_NUMBER | ) | printf("%sL%d: ATTRIBUTE_UNUSED_LABEL\n", (INDENT_STRING), (LABEL_NUMBER)) |
Definition at line 66 of file genrecog.c.
| #define SUBROUTINE_THRESHOLD 100 |
Definition at line 146 of file genrecog.c.
| enum routine_type |
Definition at line 154 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 774 of file genrecog.c.
References abort, add_to_sequence(), 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.
| static int break_out_subroutines | ( | struct decision_head * | head, | |
| int | initial | |||
| ) | [static] |
Definition at line 1623 of file genrecog.c.
References break_out_subroutines(), decision::next, next_subroutine_number, size, sub, SUBROUTINE_THRESHOLD, and decision::success.
| static void change_state | ( | char * | oldpos, | |
| const char * | newpos, | |||
| struct decision * | afterward, | |||
| const char * | indent | |||
| ) | const [static] |
Definition at line 1694 of file genrecog.c.
References ISLOWER, ISUPPER, decision::number, printf(), strlen(), and strncmp().
Definition at line 2865 of file genrecog.c.
References debug_decision_0(), debug_decision_1(), decision_head::first, fputs(), n, decision::next, NULL, putc(), and decision::success.
Definition at line 2830 of file genrecog.c.
References debug_decision_2(), fprintf(), fputs(), decision_test::next, NULL, and putc().
| static void debug_decision_2 | ( | struct decision_test * | test | ) | [static] |
Definition at line 2770 of file genrecog.c.
References abort, fprintf(), GET_MODE_NAME, GET_RTX_NAME, HOST_WIDE_INT_PRINT_DEC, memcpy, strncpy(), and sub.
| static void factor_tests | ( | struct decision_head * | head | ) | [static] |
Definition at line 1499 of file genrecog.c.
References factor_tests(), 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.
| static void find_afterward | ( | struct decision_head * | head, | |
| struct decision * | real_afterward | |||
| ) | [static] |
Definition at line 1645 of file genrecog.c.
References decision::afterward, find_afterward(), decision_head::first, maybe_both_true(), decision::need_label, decision::next, NULL, p, q, decision::subroutine_number, and decision::success.
Definition at line 418 of file genrecog.c.
References abort, find_matching_operand(), GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, NULL, r, RTX_CODE, XEXP, XSTR, XVEC, XVECEXP, and XVECLEN.
Definition at line 363 of file genrecog.c.
References abort, find_operand(), GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, NULL, NULL_RTX, r, RTX_CODE, XEXP, XINT, XVEC, XVECEXP, and XVECLEN.
| const char* get_insn_name | ( | int code | ) |
| static int is_unconditional | ( | struct decision_test * | t, | |
| enum routine_type | subroutine_type | |||
| ) | [static] |
| int main | ( | int argc | , | |
| char ** | argv | |||
| ) |
Definition at line 2660 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 1215 of file genrecog.c.
References abort, decision_head::first, maybe_both_true(), maybe_both_true_1(), decision::next, p1, p2, strcmp(), and decision::success.
| static int maybe_both_true_1 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1180 of file genrecog.c.
References decision_test::DT_accept_op, maybe_both_true_2(), decision_test::next, t1, and t2.
| static int maybe_both_true_2 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1069 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.
Definition at line 1369 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.
| static void merge_trees | ( | struct decision_head * | oldh, | |
| struct decision_head * | addh | |||
| ) | [static] |
Definition at line 1414 of file genrecog.c.
References abort, add, maybe_both_true(), merge_accept_insn(), merge_trees(), next, decision::next, nodes_identical(), NULL, decision::prev, strcmp(), decision::success, decision::tests, and decision_test::type.
| static struct decision* new_decision | ( | char * | position, | |
| struct decision_head * | last | |||
| ) | const [static, read] |
Definition at line 323 of file genrecog.c.
References decision_head::first, decision_head::last, memset, next_number, xmalloc(), and xstrdup().
| static struct decision_test* new_decision_test | ( | enum decision_type | type, | |
| struct decision_test *** | pplace | |||
| ) | [static, read] |
Definition at line 342 of file genrecog.c.
References decision_test::next, decision_test::type, and xmalloc().
Definition at line 1332 of file genrecog.c.
References decision_test::next, nodes_identical_1(), strcmp(), t1, t2, and decision_test::type.
| static int nodes_identical_1 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
| 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 2628 of file genrecog.c.
References break_out_subroutines(), factor_tests(), find_afterward(), next_subroutine_number, NULL, PEEPHOLE2, simplify_tests(), write_subroutine(), and write_subroutines().
| static void record_insn_name | ( | int | code, | |
| const char * | name | |||
| ) | [static] |
Definition at line 2736 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 1585 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, simplify_tests(), decision::success, decision::tests, and decision_test::type.
Definition at line 473 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(), validate_pattern(), XEXP, XINT, XSTR, XVECEXP, and XVECLEN.
| 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 2058 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.
| static void write_afterward | ( | struct decision * | start, | |
| struct decision * | afterward, | |||
| const char * | indent | |||
| ) | [static] |
Definition at line 1766 of file genrecog.c.
References change_state(), NULL, decision::number, decision::position, printf(), and decision::subroutine_number.
| static void write_cond | ( | struct decision_test * | p, | |
| int | depth, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 1983 of file genrecog.c.
References abort, GET_MODE_NAME, HOST_WIDE_INT_PRINT_DEC_C, print_code(), printf(), and RECOG.
| static int write_node | ( | struct decision * | p, | |
| int | depth, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2178 of file genrecog.c.
References is_unconditional(), decision_test::next, NULL, printf(), write_action(), and write_cond().
| static void write_subroutine | ( | struct decision_head * | head, | |
| enum routine_type | type | |||
| ) | [static] |
| static void write_subroutines | ( | struct decision_head * | head, | |
| enum routine_type | type | |||
| ) | [static] |
Definition at line 2380 of file genrecog.c.
References decision_head::first, decision::next, p, decision::success, write_subroutine(), and write_subroutines().
Definition at line 1784 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().
| static void write_tree | ( | struct decision_head * | head, | |
| const char * | prevpos, | |||
| enum routine_type | type, | |||
| int | initial | |||
| ) | [static] |
Definition at line 2253 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, write_tree(), and write_tree_1().
| static void write_tree_1 | ( | struct decision_head * | head, | |
| int | depth, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2217 of file genrecog.c.
References decision::need_label, next, decision::next, decision::number, OUTPUT_LABEL, p, write_afterward(), write_node(), and write_switch().
int error_count [static] |
Definition at line 182 of file genrecog.c.
char** insn_name_ptr = 0 [static] |
Definition at line 70 of file genrecog.c.
int insn_name_ptr_size = 0 [static] |
Definition at line 71 of file genrecog.c.
int max_depth [static] |
Definition at line 176 of file genrecog.c.
int next_index [static] |
Definition at line 171 of file genrecog.c.
int next_insn_code [static] |
Definition at line 166 of file genrecog.c.
int next_number [static] |
Definition at line 162 of file genrecog.c.
int next_subroutine_number [static] |
Definition at line 148 of file genrecog.c.
int pattern_lineno [static] |
Definition at line 179 of file genrecog.c.
struct pred_table preds[] [static] |
const char* const special_mode_pred_table[] [static] |
1.5.6