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

Public Member Functions

void build (vec_info *) final override

Static Public Member Functions

static internal_fn matches (complex_operation_t op, slp_tree_to_load_perm_map_t *, slp_compat_nodes_map_t *, slp_tree *, vec< slp_tree > *)
static vect_patternrecognize (slp_tree_to_load_perm_map_t *, slp_compat_nodes_map_t *, slp_tree *)
static vect_patternmkInstance (slp_tree *node, vec< slp_tree > *m_ops, internal_fn ifn)
static internal_fn matches (complex_operation_t op, slp_tree_to_load_perm_map_t *, slp_tree *, vec< slp_tree > *)

Protected Member Functions

 complex_fms_pattern (slp_tree *node, vec< slp_tree > *m_ops, internal_fn ifn)

Protected Attributes

auto_vec< slp_treem_workset
unsigned m_num_args
internal_fn m_ifn
vec< slp_treem_ops

Constructor & Destructor Documentation

◆ complex_fms_pattern()

complex_fms_pattern::complex_fms_pattern ( slp_tree * node,
vec< slp_tree > * m_ops,
internal_fn ifn )

References vect_pattern::m_num_args.

Referenced by mkInstance(), and recognize().

Member Function Documentation

◆ build()

void complex_fms_pattern::build ( vec_info * vinfo)
Perform a replacement of the detected complex mul pattern with the new
instruction sequences.   

Implements vect_pattern.

References complex_pattern::build(), FOR_EACH_VEC_ELT, i, vect_pattern::m_node, vect_pattern::m_ops, SLP_TREE_CHILDREN, SLP_TREE_REF_COUNT, vect_build_combine_node(), and vect_free_slp_tree().

◆ matches() [1/2]

internal_fn complex_fms_pattern::matches ( complex_operation_t op,
slp_tree_to_load_perm_map_t * perm_cache,
slp_compat_nodes_map_t * compat_cache,
slp_tree * ref_node,
vec< slp_tree > * ops )
Pattern matcher for trying to match complex multiply and subtract pattern
in SLP tree.  If the operation matches then IFN is set to the operation
it matched and the arguments to the two replacement statements are put in

If no match is found then IFN is set to IFN_LAST and m_ops is unchanged.

This function matches the patterns shaped as:

double ax = (b[i+1] * a[i]) + (b[i] * a[i]);
double bx = (a[i+1] * b[i]) - (a[i+1] * b[i+1]);

c[i] = c[i] - ax;
c[i+1] = c[i+1] + bx;

If a match occurred then TRUE is returned, else FALSE.  The initial match is
expected to be in OP1 and the initial match operands in args0.   

References CMPLX_NONE, CONJ_NONE, IFN_LAST, linear_loads_p(), PERM_EVENODD, PLUS_MINUS, SLP_TREE_CHILDREN, vect_detect_pair_op(), vect_match_expression_p(), vect_pattern_validate_optab(), and vect_validate_multiplication().

Referenced by recognize(), and complex_operations_pattern::recognize().

◆ matches() [2/2]

static internal_fn complex_pattern::matches ( complex_operation_t op,
slp_tree_to_load_perm_map_t * ,
slp_tree * ,
vec< slp_tree > *  )

◆ mkInstance()

static vect_pattern * complex_fms_pattern::mkInstance ( slp_tree * node,
vec< slp_tree > * m_ops,
internal_fn ifn )

◆ recognize()

vect_pattern * complex_fms_pattern::recognize ( slp_tree_to_load_perm_map_t * perm_cache,
slp_compat_nodes_map_t * compat_cache,
slp_tree * node )
Attempt to recognize a complex mul pattern.   

References complex_fms_pattern(), IFN_LAST, matches(), NULL, and vect_detect_pair_op().

Field Documentation

◆ m_ifn

internal_fn vect_pattern::m_ifn

◆ m_node

slp_tree* vect_pattern::m_node

◆ m_num_args

◆ m_ops

◆ m_workset

auto_vec<slp_tree> complex_pattern::m_workset

Referenced by complex_pattern::build().

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