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

Public Types

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

Public Member Functions

 dt_simplify (simplify *s_, unsigned pattern_no_, dt_operand **indexes_)
 
void gen_1 (FILE *, int, bool, operand *)
 
void gen (FILE *f, int, bool, int) final override
 
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

simplifys
 
unsigned pattern_no
 
dt_operand ** indexes
 
sinfoinfo
 
enum dt_type type
 
unsigned level
 
dt_nodeparent
 
vec< dt_node * > kids
 
unsigned num_leafs
 
unsigned total_size
 
unsigned max_level
 

Detailed Description

Leaf node of the decision tree, used for DT_SIMPLIFY.   

Member Enumeration Documentation

◆ dt_type

Enumerator
DT_NODE 
DT_OPERAND 
DT_TRUE 
DT_MATCH 
DT_SIMPLIFY 

Constructor & Destructor Documentation

◆ dt_simplify()

dt_simplify::dt_simplify ( simplify * s_,
unsigned pattern_no_,
dt_operand ** indexes_ )
inline

Member Function Documentation

◆ analyze()

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

References ggc_alloc(), i, 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_simplify::gen ( FILE * f,
int indent,
bool gimple,
int depth )
finaloverridevirtual
Generate code for the '(if ...)', '(with ..)' and actual transform
step of a '(simplify ...)' or '(match ...)'.  This handles everything
that is not part of the decision tree (simplify->match).   

Reimplemented from dt_node.

References fprintf_indent(), gcc_unreachable, get_name(), ggc_alloc(), i, and output_line_directive().

◆ gen_1()

void dt_simplify::gen_1 ( FILE * f,
int indent,
bool gimple,
operand * result )
Generate code for the '(if ...)', '(with ..)' and actual transform
step of a '(simplify ...)' or '(match ...)'.  This handles everything
that is not part of the decision tree (simplify->match).
Main recursive worker.   

References emit_logging_call(), expr::expr_type, fail_label, expr::force_leaf, capture_info::force_no_side_effects, fprintf_indent(), gcc_unreachable, operand::gen_transform(), get_operand_type(), ggc_alloc(), i, id_base::id, capture_info::info, NULL, operand::OP_C_EXPR, operand::OP_CAPTURE, operand::OP_EXPR, expr::operation, expr::ops, output_line_directive(), simplify::SIMPLIFY, operand::type, verbose, and warning_at().

Referenced by decision_tree::gen().

◆ 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.

Field Documentation

◆ indexes

dt_operand** dt_simplify::indexes

◆ info

sinfo* dt_simplify::info

Referenced by dt_node::analyze().

◆ kids

vec<dt_node *> dt_node::kids
inherited

◆ level

unsigned dt_node::level
inherited

◆ max_level

unsigned dt_node::max_level
inherited

◆ num_leafs

unsigned dt_node::num_leafs
inherited

◆ parent

dt_node* dt_node::parent
inherited

◆ pattern_no

unsigned dt_simplify::pattern_no

◆ s

simplify* dt_simplify::s

◆ total_size

unsigned dt_node::total_size
inherited

◆ type


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