Public Types | |
enum | dt_type { DT_NODE , DT_OPERAND , DT_TRUE , DT_MATCH , DT_SIMPLIFY } |
Public Member Functions | |
dt_operand (enum dt_type type, operand *op_, dt_operand *match_dop_, dt_operand *parent_, unsigned pos_) | |
void | gen (FILE *, int, bool, int) final override |
unsigned | gen_predicate (FILE *, int, const char *, bool) |
unsigned | gen_match_op (FILE *, int, const char *, bool) |
unsigned | gen_gimple_expr (FILE *, int, int) |
unsigned | gen_generic_expr (FILE *, int, const char *) |
char * | get_name (char *) |
void | gen_opname (char *, unsigned) |
void | gen_phi_on_cond (FILE *, int, int) |
dt_node * | append_node (dt_node *) |
dt_node * | append_op (operand *, dt_node *parent, unsigned pos) |
dt_node * | append_true_op (operand *, dt_node *parent, unsigned pos) |
dt_node * | append_match_op (operand *, dt_operand *, dt_node *parent, unsigned pos) |
dt_node * | append_simplify (simplify *, unsigned, dt_operand **) |
void | gen_kids (FILE *, int, bool, int) |
void | gen_kids_1 (FILE *, int, bool, int, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_node * > &) |
void | analyze (sinfo_map_t &) |
Data Fields | |
operand * | op |
dt_operand * | match_dop |
unsigned | pos |
bool | value_match |
unsigned | for_id |
enum dt_type | type |
unsigned | level |
dt_node * | parent |
vec< dt_node * > | kids |
unsigned | num_leafs |
unsigned | total_size |
unsigned | max_level |
Generic decision tree node used for DT_OPERAND, DT_MATCH and DT_TRUE.
|
inherited |
|
inline |
References current_id, dt_node::dt_node(), dt_operand(), false, for_id, match_dop, op, pos, dt_node::type, and value_match.
Referenced by dt_operand().
|
inherited |
Analyze the node and its children.
References as_a(), DT_SIMPLIFY, i, dt_simplify::info, kids, level, map, MAX, max_level, NULL, num_leafs, si, total_size, and type.
|
inherited |
Append a DT_MATCH decision tree node.
References append_node(), as_a(), DT_MATCH, dt_node(), and parent.
Referenced by decision_tree::insert_operand().
Append N to the decision tree if it there is not already an existing identical child.
References dt_node(), decision_tree::find_node(), kids, and level.
Referenced by append_match_op(), append_op(), append_simplify(), and append_true_op().
Append OP to the decision tree.
References append_node(), dt_node(), DT_OPERAND, parent, and safe_as_a().
Referenced by decision_tree::insert_operand().
|
inherited |
Append S to the decision tree.
References append_node(), dyn_cast(), i, kids, operand::location, simplify::match, print_operand(), dt_simplify::s, verbose, and warning_at().
Referenced by decision_tree::insert().
Append a DT_TRUE decision tree node.
References append_node(), dt_node(), DT_TRUE, parent, and safe_as_a().
Referenced by decision_tree::insert_operand().
|
finaloverridevirtual |
Generate matching code for the decision tree operand.
Reimplemented from dt_node.
References dt_node::DT_MATCH, dt_node::DT_OPERAND, dt_node::DT_TRUE, fprintf_indent(), gcc_unreachable, gen_generic_expr(), gen_gimple_expr(), dt_node::gen_kids(), gen_match_op(), gen_predicate(), get_name(), i, op, operand::OP_EXPR, operand::OP_PREDICATE, and dt_node::type.
unsigned dt_operand::gen_generic_expr | ( | FILE * | f, |
int | indent, | ||
const char * | opname ) |
Generate GENERIC matching code for the decision tree operand.
References id_base::CODE, dyn_cast(), fprintf_indent(), gen_opname(), i, op, expr::operation, and expr::ops.
Referenced by gen().
unsigned dt_operand::gen_gimple_expr | ( | FILE * | f, |
int | indent, | ||
int | depth ) |
Generate GIMPLE matching code for the decision tree operand.
References id_base::CODE, commutative_op(), dyn_cast(), fprintf_indent(), gen_opname(), get_name(), i, expr::is_generic, op, expr::operation, and expr::ops.
Referenced by gen().
|
inherited |
Generate matching code for the children of the decision tree node.
References as_a(), DT_MATCH, DT_OPERAND, DT_SIMPLIFY, DT_TRUE, dyn_cast(), id_base::FN, fns_cmp(), gcc_unreachable, gen_kids_1(), i, expr::is_generic, kids, id_base::kind, dt_operand::op, operand::OP_PREDICATE, expr::operation, expr::ops, id_base::PREDICATE, user_id::substitutes, type, and operand::type.
Referenced by decision_tree::gen(), dt_operand::gen(), dt_operand::gen_phi_on_cond(), and write_predicate().
|
inherited |
Generate matching code for the children of the decision tree node.
References as_a(), dyn_cast(), id_base::FN, fprintf_indent(), gcc_assert, gen(), i, id_base::id, id_base::kind, expr::match_phi, id_base::nargs, NULL, expr::operation, and expr::ops.
Referenced by gen_kids().
unsigned dt_operand::gen_match_op | ( | FILE * | f, |
int | indent, | ||
const char * | opname, | ||
bool | ) |
Generate matching code for the decision tree operand which is a capture-match.
References fprintf_indent(), match_dop, and value_match.
Referenced by gen().
void dt_operand::gen_opname | ( | char * | name, |
unsigned | pos ) |
Fill NAME with the operand name at position POS.
References dt_node::level, dt_node::parent, and pos.
Referenced by gen_generic_expr(), gen_gimple_expr(), and gen_phi_on_cond().
void dt_operand::gen_phi_on_cond | ( | FILE * | f, |
int | indent, | ||
int | depth ) |
Generate matching code for the phi when meet COND_EXPR.
References fprintf_indent(), dt_node::gen_kids(), and gen_opname().
unsigned dt_operand::gen_predicate | ( | FILE * | f, |
int | indent, | ||
const char * | opname, | ||
bool | gimple ) |
Generate matching code for the decision tree operand which is a predicate.
References as_a(), fprintf_indent(), id_base::id, predicate_id::matchers, op, and predicate::p.
Referenced by gen().
char * dt_operand::get_name | ( | char * | name | ) |
Return the name of the operand representing the decision tree node. Use NAME as space to generate it.
References as_a(), dt_node::DT_MATCH, dt_node::parent, and pos.
unsigned dt_operand::for_id |
Referenced by dt_operand(), and decision_tree::find_node().
Referenced by analyze(), append_node(), append_simplify(), dt_node(), gen_kids(), decision_tree::insert_operand(), and decision_tree::print_node().
|
inherited |
Referenced by analyze(), append_node(), dt_node(), dt_operand::gen_opname(), and decision_tree::print_node().
dt_operand* dt_operand::match_dop |
Referenced by dt_operand(), and gen_match_op().
|
inherited |
Referenced by analyze().
|
inherited |
Referenced by analyze().
operand* dt_operand::op |
|
inherited |
unsigned dt_operand::pos |
Referenced by dt_operand(), gen_opname(), and get_name().
|
inherited |
Referenced by analyze().
|
inherited |
bool dt_operand::value_match |
Referenced by dt_operand(), gen_match_op(), and decision_tree::insert_operand().