#include "bconfig.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "rtl.h"#include "errors.h"#include "gensupport.h"

Go to the source code of this file.
| #define I 2 |
Definition at line 212 of file genrecog.c.
Definition at line 153 of file genrecog.c.
| #define N 0 |
Definition at line 210 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 61 of file genrecog.c.
| #define SUBROUTINE_THRESHOLD 100 |
Definition at line 141 of file genrecog.c.
Definition at line 224 of file genrecog.c.
| #define Y 1 |
Definition at line 211 of file genrecog.c.
| enum routine_type |
Definition at line 149 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 895 of file genrecog.c.
References add_to_sequence(), base, decision_test::code, pred_data::codes, decision_test::DT_num_insns, decision_test::DT_veclen_ge, decision_test::dup, decision_head::first, free(), gcc_assert, gcc_unreachable, GET_CODE, GET_MODE, GET_RTX_FORMAT, GET_RTX_LENGTH, GET_RTX_NAME, i, int, decision_test::intval, decision_head::last, len, lookup_predicate(), max_depth, message_with_line(), decision_test::mode, mode, pred_data::name, new_decision(), new_decision_test(), NULL, decision_test::num_insns, num_insns, decision_test::opno, pattern_lineno, PEEPHOLE2, decision_test::pred, ret, RTX_CODE, pred_data::singleton, size_t, 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 1729 of file genrecog.c.
References break_out_subroutines(), decision_head::first, decision::next, next_subroutine_number, size, sub, decision::subroutine_number, SUBROUTINE_THRESHOLD, and decision::success.
| static void change_state | ( | const char * | oldpos, | |
| const char * | newpos, | |||
| const char * | indent | |||
| ) | [static] |
Definition at line 233 of file genrecog.c.
References AND, pred_data::codes, codes, compute_predicate_codes(), did_you_mean_codes, error_count, GET_CODE, GET_RTX_NAME, I, i, lookup_predicate(), memset, message_with_line(), N, n, NOT, p, pattern_lineno, scan_comma_elt(), strncasecmp(), strncmp(), TRISTATE_AND, TRISTATE_NOT, TRISTATE_OR, XEXP, XSTR, and Y.
Definition at line 2895 of file genrecog.c.
References debug_decision_0(), debug_decision_1(), decision_head::first, fputs(), i, n, decision::next, NULL, putc(), and decision::success.
Definition at line 2862 of file genrecog.c.
References decision::afterward, debug_decision_2(), fprintf(), fputs(), i, decision::next, decision_test::next, NULL, decision::number, putc(), and decision::tests.
| static void debug_decision_2 | ( | struct decision_test * | test | ) | [static] |
Definition at line 2802 of file genrecog.c.
References decision_test::c_test, decision_test::code, decision_test::dup, fprintf(), gcc_unreachable, GET_MODE_NAME, GET_RTX_NAME, HOST_WIDE_INT_PRINT_DEC, decision_test::insn, decision_test::intval, memcpy, decision_test::mode, decision_test::num_insns, decision_test::opno, decision_test::pred, strncpy(), sub, decision_test::type, decision_test::u, and decision_test::veclen.
| static void factor_tests | ( | struct decision_head * | head | ) | [static] |
Definition at line 1607 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 1749 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 584 of file genrecog.c.
References find_matching_operand(), gcc_unreachable, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, NULL, r, RTX_CODE, XEXP, XSTR, XVEC, XVECEXP, and XVECLEN.
Definition at line 528 of file genrecog.c.
References find_operand(), gcc_unreachable, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, NULL, NULL_RTX, r, RTX_CODE, XEXP, XINT, XVEC, XVECEXP, and XVECLEN.
| static int is_unconditional | ( | struct decision_test * | t, | |
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2238 of file genrecog.c.
References gcc_unreachable, decision_test::insn, PEEPHOLE2, RECOG, SPLIT, decision_test::type, and decision_test::u.
| int main | ( | int argc | , | |
| char ** | argv | |||
| ) |
Definition at line 2736 of file genrecog.c.
References error_count, FATAL_EXIT_CODE, ferror(), fflush(), GET_CODE, have_error, init_md_reader_args(), make_insn_sequence(), memset, merge_trees(), next_insn_code, NULL, pattern_lineno, PEEPHOLE2, process_define_predicate(), 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 2540 of file genrecog.c.
References add_to_sequence(), gcc_assert, GET_CODE, i, insn, decision_head::last, maybe_eval_c_test(), memset, merge_trees(), new_decision(), new_decision_test(), decision_test::next, next_insn_code, NULL_RTX, pattern_lineno, PEEPHOLE2, printf(), PUT_MODE, RECOG, REG_P, rtvec_alloc(), rtx_alloc, SPLIT, decision::success, decision::tests, tmp, validate_pattern(), x, XEXP, XSTR, XVEC, XVECEXP, XVECLEN, and is::y.
Definition at line 1327 of file genrecog.c.
References decision_head::first, gcc_assert, maybe_both_true(), maybe_both_true_1(), decision::next, p1, p2, decision::position, strcmp(), decision::success, and decision::tests.
| static int maybe_both_true_1 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1293 of file genrecog.c.
References decision_test::DT_accept_op, maybe_both_true_2(), decision_test::next, t1, t2, and decision_test::type.
| static int maybe_both_true_2 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1188 of file genrecog.c.
References c, decision_test::code, decision_test::DT_code, decision_test::DT_mode, decision_test::DT_pred, decision_test::DT_veclen, decision_test::DT_veclen_ge, decision_test::intval, decision_test::mode, decision_test::num_insns, NUM_RTX_CODE, decision_test::pred, strcmp(), tmp, decision_test::type, decision_test::u, and decision_test::veclen.
Definition at line 1480 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::tests, decision_test::type, and decision_test::u.
| static void merge_trees | ( | struct decision_head * | oldh, | |
| struct decision_head * | addh | |||
| ) | [static] |
Definition at line 1524 of file genrecog.c.
References add, decision_head::first, gcc_assert, decision_head::last, maybe_both_true(), merge_accept_insn(), merge_trees(), next, decision::next, nodes_identical(), NULL, decision::position, decision::prev, strcmp(), decision::success, decision::tests, and decision_test::type.
| static struct decision * new_decision | ( | const char * | position, | |
| struct decision_head * | last | |||
| ) | [static, read] |
Definition at line 494 of file genrecog.c.
References decision_head::first, decision_head::last, next_number, xcalloc(), and xstrdup().
| static struct decision_test * new_decision_test | ( | enum decision_type | type, | |
| struct decision_test *** | pplace | |||
| ) | [static, read] |
Definition at line 509 of file genrecog.c.
References decision_test::next, decision_test::type, and XNEW.
Definition at line 1444 of file genrecog.c.
References decision_head::first, decision_test::next, nodes_identical_1(), decision::position, strcmp(), decision::success, t1, t2, decision::tests, and decision_test::type.
| static int nodes_identical_1 | ( | struct decision_test * | d1, | |
| struct decision_test * | d2 | |||
| ) | [static] |
Definition at line 1394 of file genrecog.c.
References decision_test::c_test, decision_test::code, decision_test::dup, gcc_unreachable, decision_test::intval, decision_test::mode, decision_test::num_insns, decision_test::opno, decision_test::pred, strcmp(), decision_test::type, decision_test::u, and decision_test::veclen.
| static void print_host_wide_int | ( | HOST_WIDE_INT | val | ) | [static] |
Definition at line 1866 of file genrecog.c.
References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT_PRINT_DEC_C, min, and printf().
Definition at line 367 of file genrecog.c.
References add_predicate(), pred_data::allows_non_const, pred_data::allows_non_lvalue, pred_data::codes, codes, compute_predicate_codes(), CONCAT, GET_CODE, GET_RTX_CLASS, i, MEM, N, pred_data::name, NUM_RTX_CODE, REG, RTX_CONST_OBJ, pred_data::singleton, pred_data::special, UNKNOWN, xcalloc(), XEXP, and XSTR.
| static void process_tree | ( | struct decision_head * | head, | |
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2706 of file genrecog.c.
References break_out_subroutines(), factor_tests(), find_afterward(), decision_head::first, next_subroutine_number, NULL, PEEPHOLE2, simplify_tests(), write_subroutine(), and write_subroutines().
| static void simplify_tests | ( | struct decision_head * | head | ) | [static] |
Definition at line 1692 of file genrecog.c.
References a, b, decision_test::DT_code, decision_test::DT_mode, decision_test::DT_pred, decision_head::first, decision::next, decision_test::next, NULL, simplify_tests(), decision::success, decision::tests, and decision_test::type.
Definition at line 637 of file genrecog.c.
References pred_data::allows_non_const, pred_data::allows_non_lvalue, dest, error_count, find_matching_operand(), find_operand(), gcc_unreachable, GET_CODE, GET_MODE, GET_MODE_NAME, GET_RTX_FORMAT, GET_RTX_LENGTH, i, len, lookup_predicate(), message_with_line(), NULL, NULL_RTX, pattern_lineno, PC, RTX_CODE, rtx_name, SET, SET_DEST, SET_SRC, pred_data::special, 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 2150 of file genrecog.c.
References fputs(), gcc_assert, gcc_unreachable, get_insn_name(), i, indent, decision_test::insn, ISUPPER, decision::need_label, decision_test::next, decision::number, decision_test::opno, PEEPHOLE2, decision::position, 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 1849 of file genrecog.c.
References change_state(), 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 2076 of file genrecog.c.
References decision_test::c_test, decision_test::code, decision_test::dup, gcc_assert, gcc_unreachable, GET_MODE_NAME, decision_test::insn, decision_test::intval, decision_test::mode, decision_test::num_insns, decision_test::pred, print_c_condition(), print_code(), print_host_wide_int(), printf(), RECOG, decision_test::type, decision_test::u, and decision_test::veclen.
| static int write_node | ( | struct decision * | p, | |
| int | depth, | |||
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2265 of file genrecog.c.
References decision_test::code, decision_test::DT_code, decision_test::DT_const_int, decision_test::DT_elt_zero_wide_safe, decision_head::first, decision_test::intval, is_unconditional(), MAX_SAVED_CONST_INT, next, decision_test::next, NULL, printf(), decision::success, decision::tests, decision_test::type, decision_test::u, write_action(), and write_cond().
| static void write_subroutine | ( | struct decision_head * | head, | |
| enum routine_type | type | |||
| ) | [static] |
Definition at line 2407 of file genrecog.c.
References decision_head::first, i, IS_SPLIT, max_depth, PEEPHOLE2, printf(), RECOG, SPLIT, sprintf(), strcpy, decision::subroutine_number, and write_tree().
| static void write_subroutines | ( | struct decision_head * | head, | |
| enum routine_type | type | |||
| ) | [static] |
Definition at line 2462 of file genrecog.c.
References decision_head::first, decision::next, p, decision::subroutine_number, decision::success, write_subroutine(), and write_subroutines().
Definition at line 1879 of file genrecog.c.
References decision::afterward, c, decision_test::code, pred_data::codes, decision_head::first, fputs(), gcc_unreachable, GET_MODE_NAME, indent, 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, print_code(), print_host_wide_int(), 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 2350 of file genrecog.c.
References decision::afterward, change_state(), decision_head::first, IS_SPLIT, decision::need_label, decision::next, 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 2316 of file genrecog.c.
References decision::afterward, decision_head::first, decision_head::last, decision::need_label, next, decision::next, decision::number, OUTPUT_LABEL, p, write_afterward(), write_node(), and write_switch().
char did_you_mean_codes[NUM_RTX_CODE] [static] |
Definition at line 228 of file genrecog.c.
int error_count [static] |
Definition at line 172 of file genrecog.c.
int max_depth [static] |
Definition at line 166 of file genrecog.c.
int next_insn_code [static] |
Definition at line 161 of file genrecog.c.
int next_number [static] |
Definition at line 157 of file genrecog.c.
int next_subroutine_number [static] |
Definition at line 143 of file genrecog.c.
int pattern_lineno [static] |
Definition at line 169 of file genrecog.c.
1.5.6