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

Public Member Functions

void insert (class simplify *, unsigned)
void gen (vec< FILE * > &f, bool gimple)
void print (FILE *f=stderr)
 decision_tree ()

Static Public Member Functions

static dt_nodeinsert_operand (dt_node *, operand *, dt_operand **indexes, unsigned pos=0, dt_node *parent=0)
static dt_nodefind_node (vec< dt_node * > &, dt_node *)
static bool cmp_node (dt_node *, dt_node *)
static void print_node (dt_node *, FILE *f=stderr, unsigned=0)

Data Fields

dt_noderoot

Detailed Description

A container for the actual decision tree.   

Constructor & Destructor Documentation

◆ decision_tree()

decision_tree::decision_tree ( )
inline

References dt_node::DT_NODE, NULL, and root.

Member Function Documentation

◆ cmp_node()

bool decision_tree::cmp_node ( dt_node * n1,
dt_node * n2 )
static
Compare two decision tree nodes N1 and N2 and return true if they
are equal.   

References as_a(), cmp_operand(), dt_node::DT_MATCH, dt_node::DT_OPERAND, dt_node::DT_TRUE, and dt_node::type.

Referenced by find_node().

◆ find_node()

dt_node * decision_tree::find_node ( vec< dt_node * > & ops,
dt_node * p )
static
Search OPS for a decision tree node like P and return it if found.   

References as_a(), cmp_node(), current_id, dt_node::DT_OPERAND, dt_node::DT_TRUE, dt_operand::for_id, i, operand::location, NULL, dt_operand::op, dt_node::type, verbose, and warning_at().

Referenced by dt_node::append_node(), and insert_operand().

◆ gen()

void decision_tree::gen ( vec< FILE * > & files,
bool gimple )
Main entry to generate code for matching GIMPLE IL off the decision
tree.   

References choose_output(), id_base::CODE, fp_decl(), fp_decl_done(), fprintf_indent(), dt_node::gen_kids(), i, is_a(), dt_operand::op, output_line_directive(), root, si, and verbose.

Referenced by main().

◆ insert()

void decision_tree::insert ( class simplify * s,
unsigned pattern_no )
Insert S into the decision tree.   

References dt_node::append_simplify(), current_id, insert_operand(), and root.

Referenced by main().

◆ insert_operand()

dt_node * decision_tree::insert_operand ( dt_node * p,
operand * o,
dt_operand ** indexes,
unsigned pos = 0,
dt_node * parent = 0 )
static

◆ print()

DEBUG_FUNCTION void decision_tree::print ( FILE * f = stderr)

References print_node(), and root.

Referenced by main().

◆ print_node()

DEBUG_FUNCTION void decision_tree::print_node ( dt_node * p,
FILE * f = stderr,
unsigned indent = 0 )
static

Field Documentation

◆ root

dt_node* decision_tree::root

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