GCC Middle and Back End API Reference
gimple_match_op Class Reference

#include <gimple-match.h>

Collaboration diagram for gimple_match_op:

Public Member Functions

 gimple_match_op ()
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, unsigned int)
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, tree)
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, tree, tree)
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, tree, tree, tree)
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, tree, tree, tree, tree)
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, tree, tree, tree, tree, tree)
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, tree, tree, tree, tree, tree, tree)
 
 gimple_match_op (const gimple_match_cond &, code_helper, tree, tree, tree, tree, tree, tree, tree, tree)
 
void set_op (code_helper, tree, unsigned int)
 
void set_op (code_helper, tree, tree)
 
void set_op (code_helper, tree, tree, tree)
 
void set_op (code_helper, tree, tree, tree, tree)
 
void set_op (code_helper, tree, tree, tree, tree, bool)
 
void set_op (code_helper, tree, tree, tree, tree, tree)
 
void set_op (code_helper, tree, tree, tree, tree, tree, tree)
 
void set_op (code_helper, tree, tree, tree, tree, tree, tree, tree)
 
void set_op (code_helper, tree, tree, tree, tree, tree, tree, tree, tree)
 
void set_value (tree)
 
tree op_or_null (unsigned int) const
 
bool resimplify (gimple_seq *, tree(*)(tree))
 

Data Fields

gimple_match_cond cond
 
code_helper code
 
tree type
 
bool reverse
 
unsigned int num_ops
 
tree ops [MAX_NUM_OPS]
 

Static Public Attributes

static const unsigned int MAX_NUM_OPS = 7
 

Detailed Description

Represents an operation to be simplified, or the result of the
simplification.   

Constructor & Destructor Documentation

◆ gimple_match_op() [1/9]

gimple_match_op::gimple_match_op ( )
inline

◆ gimple_match_op() [2/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
unsigned int num_ops_in )
inline
Constructor that takes the condition, code, type and number of
operands, but leaves the caller to fill in the operands.   

◆ gimple_match_op() [3/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
tree op0 )
inline
Constructors for various numbers of operands.   

References ops.

◆ gimple_match_op() [4/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
tree op0,
tree op1 )
inline

References ops.

◆ gimple_match_op() [5/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2 )
inline

References ops.

◆ gimple_match_op() [6/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3 )
inline

References ops.

◆ gimple_match_op() [7/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3,
tree op4 )
inline

References ops.

◆ gimple_match_op() [8/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3,
tree op4,
tree op5 )
inline

References ops.

◆ gimple_match_op() [9/9]

gimple_match_op::gimple_match_op ( const gimple_match_cond & cond_in,
code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3,
tree op4,
tree op5,
tree op6 )
inline

References ops.

Member Function Documentation

◆ op_or_null()

tree gimple_match_op::op_or_null ( unsigned int i) const
inline
Return the value of operand I, or null if there aren't that many
operands.   

References i, NULL_TREE, num_ops, and ops.

Referenced by build_call_internal(), maybe_push_res_to_seq(), maybe_resimplify_conditional_op(), and replace_stmt_with_simplification().

◆ resimplify()

bool gimple_match_op::resimplify ( gimple_seq * seq,
tree(* valueize )(tree) )
Match and simplify the toplevel valueized operation THIS.
Replaces THIS with a simplified and/or canonicalized result and
returns whether any change was made.   

References gcc_unreachable, gimple_resimplify1(), gimple_resimplify2(), gimple_resimplify3(), gimple_resimplify4(), gimple_resimplify5(), gimple_resimplify6(), gimple_resimplify7(), and num_ops.

Referenced by fold_build_cond_expr(), gimple_simplify(), gimple_simplify_phiopt(), maybe_fold_comparisons_from_match_pd(), predicate_bbs(), tree_vec_extract(), and vn_nary_build_or_lookup_1().

◆ set_op() [1/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0 )
inline
Functions for changing the operation performed, for various numbers
of operands.   

References code, num_ops, and ops.

◆ set_op() [2/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0,
tree op1 )
inline

References code, num_ops, and ops.

◆ set_op() [3/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2 )
inline

References code, num_ops, and ops.

◆ set_op() [4/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
bool reverse_in )
inline

References code, num_ops, ops, and reverse.

◆ set_op() [5/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3 )
inline

References code, num_ops, and ops.

◆ set_op() [6/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3,
tree op4 )
inline

References code, num_ops, and ops.

◆ set_op() [7/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3,
tree op4,
tree op5 )
inline

References code, num_ops, and ops.

◆ set_op() [8/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
tree op0,
tree op1,
tree op2,
tree op3,
tree op4,
tree op5,
tree op6 )
inline

References code, num_ops, and ops.

◆ set_op() [9/9]

void gimple_match_op::set_op ( code_helper code_in,
tree type_in,
unsigned int num_ops_in )
inline
Change the operation performed to CODE_IN, the type of the result to
TYPE_IN, and the number of operands to NUM_OPS_IN.  The caller needs
to set the operands itself.   

References code, and num_ops.

Referenced by convert_conditional_op(), gimple_extract(), maybe_resimplify_conditional_op(), set_value(), and tree_vec_extract().

◆ set_value()

void gimple_match_op::set_value ( tree value)
inline
Set the "operation" to be the single value VALUE, such as a constant
or SSA_NAME.   

References set_op(), TREE_CODE, and TREE_TYPE.

Referenced by gimple_resimplify1(), gimple_resimplify2(), gimple_resimplify3(), and maybe_build_generic_op().

Field Documentation

◆ code

◆ cond

◆ MAX_NUM_OPS

const unsigned int gimple_match_op::MAX_NUM_OPS = 7
static

Referenced by vn_nary_simplify().

◆ num_ops

◆ ops

◆ reverse

bool gimple_match_op::reverse

◆ type


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