#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 214 of file genrecog.c.
Definition at line 155 of file genrecog.c.
| #define N 0 |
Definition at line 212 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 143 of file genrecog.c.
| #define Y 1 |
Definition at line 213 of file genrecog.c.
Referenced by compute_predicate_codes(), out_movhi_mr_r(), out_movhi_r_mr(), out_movqi_mr_r(), out_movqi_r_mr(), out_movsi_mr_r(), and out_movsi_r_mr().
| enum routine_type |
Definition at line 151 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 892 of file genrecog.c.
References add_to_sequence(), base, decision_test::code, pred_data::codes, 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::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 1703 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, | |||
| struct decision * | afterward, | |||
| const char * | indent | |||
| ) | [static] |
Definition at line 1770 of file genrecog.c.
References ISLOWER, ISUPPER, decision::number, printf(), strlen(), and strncmp().
Definition at line 235 of file genrecog.c.
References AND, pred_data::codes, 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.
Referenced by compute_predicate_codes(), and process_define_predicate().
Definition at line 2886 of file genrecog.c.
Definition at line 2919 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 2886 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 2829 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::opno, decision_test::pred, strncpy(), sub, decision_test::type, decision_test::u, and decision_test::veclen.
Definition at line 2893 of file genrecog.c.
| static void factor_tests | ( | struct decision_head * | head | ) | [static] |
Definition at line 1581 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 1723 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 581 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 525 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.
| const char* get_insn_name | ( | int code | ) |
| static int is_unconditional | ( | struct decision_test * | t, | |
| enum routine_type | subroutine_type | |||
| ) | [static] |
Definition at line 2223 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 2722 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 2524 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, NULL_RTX, pattern_lineno, PEEPHOLE2, printf(), PUT_MODE, RECOG, record_insn_name(), 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 1304 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 1270 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 1171 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, NUM_RTX_CODE, decision_test::pred, strcmp(), tmp, decision_test::type, decision_test::u, and decision_test::veclen.
Definition at line 1454 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 1498 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 491 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 506 of file genrecog.c.
References decision_test::next, decision_test::type, and xmalloc().
Definition at line 1418 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 1371 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::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 1855 of file genrecog.c.
References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT_PRINT_DEC_C, min, and printf().
Referenced by write_cond(), and write_switch().
Definition at line 361 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 2692 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 record_insn_name | ( | int | code, | |
| const char * | name | |||
| ) | [static] |
Definition at line 2798 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 1666 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 634 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 2135 of file genrecog.c.
References fputs(), gcc_assert, gcc_unreachable, i, indent, decision_test::insn, insn_name_ptr, 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 1838 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 2065 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::pred, 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 2250 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 2392 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 2447 of file genrecog.c.
References decision_head::first, decision::next, p, decision::subroutine_number, decision::success, write_subroutine(), and write_subroutines().
Definition at line 1868 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 2335 of file genrecog.c.
References decision::afterward, change_state(), decision_head::first, IS_SPLIT, decision_head::last, 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 2301 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] |
int error_count [static] |
Definition at line 174 of file genrecog.c.
char** insn_name_ptr = 0 [static] |
Definition at line 65 of file genrecog.c.
int insn_name_ptr_size = 0 [static] |
Definition at line 66 of file genrecog.c.
int max_depth [static] |
Definition at line 168 of file genrecog.c.
int next_insn_code [static] |
Definition at line 163 of file genrecog.c.
int next_number [static] |
Definition at line 159 of file genrecog.c.
int next_subroutine_number [static] |
Definition at line 145 of file genrecog.c.
int pattern_lineno [static] |
Definition at line 171 of file genrecog.c.
1.5.6