diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-11-30 09:52:28 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-11-30 09:52:28 +0000 |
commit | 6f798618c070e2ca505e39c3fcc0c3ca478ac81b (patch) | |
tree | 868d81e39387ac14d9b90c36a68ae530c235bd1b /gcc/tree-if-conv.c | |
parent | 8de7958fbd126528c5a5a95a068c0692f6a643cc (diff) | |
download | gcc-6f798618c070e2ca505e39c3fcc0c3ca478ac81b.zip gcc-6f798618c070e2ca505e39c3fcc0c3ca478ac81b.tar.gz gcc-6f798618c070e2ca505e39c3fcc0c3ca478ac81b.tar.bz2 |
vect: Use generalised accessors to build SLP nodes
This patch adds:
- gimple_num_args
- gimple_arg
- gimple_arg_ptr
for accessing rhs operands of an assignment, call or PHI. This is
similar to the existing gimple_get_lhs.
I guess there's a danger that these routines could be overused,
such as in cases where gimple_assign_rhs1 etc. would be more
appropriate. I think the routines are still worth having though.
These days, most new operations are added as internal functions rather
than tree codes, so it's useful to be able to handle assignments and
calls in a consistent way.
The patch also generalises the way that SLP child nodes map
to gimple stmt operands. This is useful for later patches.
gcc/
* gimple.h (gimple_num_args, gimple_arg, gimple_arg_ptr): New
functions.
* tree-vect-slp.c (cond_expr_maps, arg2_map): New variables.
(vect_get_operand_map): New function.
(vect_get_and_check_slp_defs): Fix outdated comment.
Use vect_get_operand_map and new gimple argument accessors.
(vect_build_slp_tree_2): Likewise.
Diffstat (limited to 'gcc/tree-if-conv.c')
0 files changed, 0 insertions, 0 deletions