GCC Middle and Back End API Reference
dt_operand Class Reference
Inheritance diagram for dt_operand:
Collaboration diagram for dt_operand:

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 *)
 
charget_name (char *)
 
void gen_opname (char *, unsigned)
 
dt_nodeappend_node (dt_node *)
 
dt_nodeappend_op (operand *, dt_node *parent, unsigned pos)
 
dt_nodeappend_true_op (operand *, dt_node *parent, unsigned pos)
 
dt_nodeappend_match_op (operand *, dt_operand *, dt_node *parent, unsigned pos)
 
dt_nodeappend_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

operandop
 
dt_operandmatch_dop
 
unsigned pos
 
bool value_match
 
unsigned for_id
 
enum dt_type type
 
unsigned level
 
dt_nodeparent
 
vec< dt_node * > kids
 
unsigned num_leafs
 
unsigned total_size
 
unsigned max_level
 

Detailed Description

Generic decision tree node used for DT_OPERAND, DT_MATCH and DT_TRUE.   

Member Enumeration Documentation

◆ dt_type

Enumerator
DT_NODE 
DT_OPERAND 
DT_TRUE 
DT_MATCH 
DT_SIMPLIFY 

Constructor & Destructor Documentation

◆ dt_operand()

dt_operand::dt_operand ( enum dt_type type,
operand * op_,
dt_operand * match_dop_,
dt_operand * parent_,
unsigned pos_ )
inline

Member Function Documentation

◆ analyze()

void dt_node::analyze ( sinfo_map_t & map)
inherited
Analyze the node and its children.   

References ggc_alloc(), i, dt_simplify::info, map, MAX, NULL, sinfo::s, and si.

◆ append_match_op()

dt_node * dt_node::append_match_op ( operand * op,
dt_operand * match_dop,
dt_node * parent,
unsigned pos )
inherited
Append a DT_MATCH decision tree node.   

References ggc_alloc().

Referenced by decision_tree::insert_operand().

◆ append_node()

dt_node * dt_node::append_node ( dt_node * n)
inherited
Append N to the decision tree if it there is not already an existing
identical child.   

References decision_tree::find_node(), ggc_alloc(), and dt_node::level.

◆ append_op()

dt_node * dt_node::append_op ( operand * op,
dt_node * parent,
unsigned pos )
inherited
Append OP to the decision tree.   

References ggc_alloc().

Referenced by decision_tree::insert_operand().

◆ append_simplify()

dt_node * dt_node::append_simplify ( simplify * s,
unsigned pattern_no,
dt_operand ** indexes )
inherited
Append S to the decision tree.   

References ggc_alloc(), i, operand::location, simplify::match, print_operand(), verbose, and warning_at().

Referenced by decision_tree::insert().

◆ append_true_op()

dt_node * dt_node::append_true_op ( operand * op,
dt_node * parent,
unsigned pos )
inherited
Append a DT_TRUE decision tree node.   

References ggc_alloc().

Referenced by decision_tree::insert_operand().

◆ gen()

void dt_operand::gen ( FILE * f,
int indent,
bool gimple,
int depth )
finaloverridevirtual
Generate matching code for the decision tree operand.   

Reimplemented from dt_node.

References fprintf_indent(), gcc_unreachable, get_name(), ggc_alloc(), i, operand::OP_EXPR, and operand::OP_PREDICATE.

◆ gen_generic_expr()

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, fprintf_indent(), ggc_alloc(), i, expr::operation, and expr::ops.

◆ gen_gimple_expr()

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(), fprintf_indent(), get_name(), ggc_alloc(), i, expr::is_generic, expr::operation, and expr::ops.

◆ gen_kids()

void dt_node::gen_kids ( FILE * f,
int indent,
bool gimple,
int depth )
inherited

◆ gen_kids_1()

void dt_node::gen_kids_1 ( FILE * f,
int indent,
bool gimple,
int depth,
const vec< dt_operand * > & gimple_exprs,
const vec< dt_operand * > & generic_exprs,
const vec< dt_operand * > & fns,
const vec< dt_operand * > & generic_fns,
const vec< dt_operand * > & preds,
const vec< dt_node * > & others )
inherited
Generate matching code for the children of the decision tree node.   

References id_base::FN, fprintf_indent(), gcc_assert, ggc_alloc(), i, id_base::id, id_base::kind, id_base::nargs, NULL, expr::operation, and expr::ops.

◆ gen_match_op()

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(), and ggc_alloc().

◆ gen_opname()

void dt_operand::gen_opname ( char * name,
unsigned pos )
Fill NAME with the operand name at position POS.   

References ggc_alloc().

◆ gen_predicate()

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 fprintf_indent(), ggc_alloc(), id_base::id, predicate_id::matchers, and predicate::p.

◆ get_name()

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 dt_node::DT_MATCH, and ggc_alloc().

Field Documentation

◆ for_id

unsigned dt_operand::for_id

◆ kids

vec<dt_node *> dt_node::kids
inherited

◆ level

unsigned dt_node::level
inherited

◆ match_dop

dt_operand* dt_operand::match_dop

◆ max_level

unsigned dt_node::max_level
inherited

◆ num_leafs

unsigned dt_node::num_leafs
inherited

◆ op

operand* dt_operand::op

Referenced by fns_cmp(), and dt_node::gen_kids().

◆ parent

dt_node* dt_node::parent
inherited

◆ pos

unsigned dt_operand::pos

◆ total_size

unsigned dt_node::total_size
inherited

◆ type

◆ value_match

bool dt_operand::value_match

The documentation for this class was generated from the following file: