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

Public Types

enum  dt_type {
  DT_NODE , DT_OPERAND , DT_TRUE , DT_MATCH ,
  DT_SIMPLIFY
}

Public Member Functions

 dt_node (enum dt_type type_, dt_node *parent_)
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 **)
virtual void gen (FILE *, int, bool, int)
void gen_kids (FILE *, int, bool, int, bool, fn_splitter *=NULL)
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 * > &, bool, fn_splitter *=NULL)
void analyze (sinfo_map_t &)

Data Fields

enum dt_type type
unsigned level
dt_node * parent
vec< dt_node * > kids
unsigned num_leafs
unsigned total_size
unsigned max_level

Detailed Description

Decision tree base class, used for DT_NODE.   

Member Enumeration Documentation

◆ dt_type

Enumerator
DT_NODE 
DT_OPERAND 
DT_TRUE 
DT_MATCH 
DT_SIMPLIFY 

Constructor & Destructor Documentation

◆ dt_node()

Member Function Documentation

◆ analyze()

void dt_node::analyze ( sinfo_map_t & map)

◆ append_match_op()

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

References append_node(), as_a(), DT_MATCH, dt_node(), dt_operand::dt_operand(), and parent.

Referenced by decision_tree::insert_operand().

◆ append_node()

dt_node * dt_node::append_node ( dt_node * n)
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()

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

References append_node(), dt_node(), DT_OPERAND, dt_operand::dt_operand(), parent, and safe_as_a().

Referenced by decision_tree::insert_operand().

◆ append_simplify()

dt_node * dt_node::append_simplify ( simplify * s,
unsigned pattern_no,
dt_operand ** indexes )

◆ append_true_op()

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

References append_node(), dt_node(), dt_operand::dt_operand(), DT_TRUE, parent, and safe_as_a().

Referenced by decision_tree::insert_operand().

◆ gen()

virtual void dt_node::gen ( FILE * ,
int ,
bool ,
int  )
inlinevirtual

Reimplemented in dt_operand, and dt_simplify.

Referenced by gen_kids_1().

◆ gen_kids()

void dt_node::gen_kids ( FILE * f,
int indent,
bool gimple,
int depth,
bool in_gcond,
fn_splitter * sp = NULL )
Generate matching code for the children of the decision tree node.  If SP
is not null, it splits the matcher between functions.   

References as_a(), DT_MATCH, DT_OPERAND, DT_SIMPLIFY, DT_TRUE, dyn_cast(), fn_splitter::emit_alternatives(), id_base::FN, gcc_assert, gcc_unreachable, gen_kids_1(), i, kids, dt_operand::op, operand::OP_PREDICATE, 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().

◆ 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,
bool in_gcond,
fn_splitter * sp = NULL )

Field Documentation

◆ kids

◆ level

◆ max_level

unsigned dt_node::max_level

Referenced by analyze().

◆ num_leafs

unsigned dt_node::num_leafs

Referenced by analyze().

◆ parent

◆ total_size

unsigned dt_node::total_size

Referenced by analyze(), and decision_tree::gen().

◆ type


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