aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-transform.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-08-09 16:01:22 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2007-08-09 14:01:22 +0000
commit166cdb08f21ed5009f1890b717a4eaf0d7f5d3a6 (patch)
treeef902503e2e5bb8764f6a2ef4dcaeff07116f6ef /gcc/tree-vect-transform.c
parent3eb0da77ceb36a1f43b8b12fffaf55707272736b (diff)
downloadgcc-166cdb08f21ed5009f1890b717a4eaf0d7f5d3a6.zip
gcc-166cdb08f21ed5009f1890b717a4eaf0d7f5d3a6.tar.gz
gcc-166cdb08f21ed5009f1890b717a4eaf0d7f5d3a6.tar.bz2
optabs.c (expand_widen_pattern_expr): Use optabs accestors.
* optabs.c (expand_widen_pattern_expr): Use optabs accestors. (expand_ternary_op): Likewise. (expand_vec_shift_expr): Likewise. (expand_binop_directly): Likewise. (expand_binop): Likewise. (sign_expand_binop): Likewise. (expand_twoval_unop): Likewise. (expand_twoval_binop): Likewise. (expand_twoval_binop_libfunc): Likewise. (widen_clz): Likewise. (widen_bswap): Likewise. (expand_parity): Likewise. (expand_unop): Likewise. (expand_abs_nojump): Likewise. (expand_copysign): Likewise. (emit_no_conflict_block): Likewise. (emit_libcall_block): Likewise. (can_compare_p): Likewise. (prepare_cmp_insn): Likewise. (emit_cmp_and_jump_insn_1): Likewise. (prepare_float_lib_cmp): Likewise. (emit_conditional_add): Likewise. (gen_add2_insn): Likewise. (have_add2_insn): Likewise. (gen_sub2_insn): Likewise. (have_sub2_insn): Likewise. (can_extend_p): Likewise. (can_fix_p): Likewise. (can_float_p): Likewise. (expand_float): Likewise. (expand_fix): Likewise. (expand_sfix_optab): Likewise. (new_optab): Likewise. (new_convert_optab): Likewise. (init_libfuncs): Likewise. (init_interclass_conv_libfuncs): Likewise. (init_intraclass_conv_libfuncs): Likewise. (set_conv_libfunc): Likewise. (init_optabs): Likewise. (debug_optab_libfuncs): Likewise. (gen_cond_trap): Likewise. * optabs.h (optab_handler, convert_optab_hanlder): New. * genopinit.c: Update optabs generation table. * reload.c (find_reloads_address_1): Use optabs accestors. * builtins.c (expand_builtin_mathfn): Likewise. (expand_builtin_mathfn_2): Likewise. (expand_builtin_mathfn_3): Likewise. (expand_builtin_interclass_mathfn): Likewise. (expand_builtin_sincos): Likewise. (expand_builtin_cexpi): Likewise. (expand_builtin_powi): Likewise. (expand_builtin_strlen): Likewise. * dojump.c (do_jump): Likewise. * expr.c (convert_move): Likewise. (move_by_pieces): Likewise. (move_by_pieces_ninsns): Likewise. (can_store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (emit_move_via_integer): Likewise. (emit_move_complex): Likewise. (emit_move_ccmode): Likewise. (emit_move_insn_1): Likewise. (emit_single_push_insn): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. (do_store_flag): Likewise. * ada/misc.c (gnat_compute_largest_alignment): Likewise. (enumerate_modes): Likewise. * tree-vectorizer.c (vect_supportable_dr_alignment): Likewise. (supportable_widening_operation): Likewise. (supportable_narrowing_operation): Likewise. * expmed.c (store_bit_field_1): Likewise. (extract_bit_field_1): Likewise. (expand_mult_highpart_optab): Likewise. (expand_smod_pow2): Likewise. (expand_divmod): Likewise. (emit_store_flag): Likewise. * tree-vect-patterns.c (vect_pattern_recog_1): Likewise. * tree-ssa-loop-prefetch.c (nontemporal_store_p): Likewise. * tree-vect-transform.c (vect_model_reduction_cost): Likewise. (vect_create_epilog_for_reduction): Likewise. (vectorizable_reduction): Likewise. (vectorizable_operation): Likewise. (vect_strided_store_supported): Likewise. (vectorizable_store): Likewise. (vect_strided_load_supported): Likewise. (vectorizable_load): Likewise. * combine.c (simplify_comparison): Likewise. * tree-vect-generic.c (type_for_widest_vector_mode): Likewise. (expand_vector_operations_1): Likewise. * config/spu/spu.c (spu_expand_mov): Likewise. (spu_emit_vector_compare): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare): Likewise. * stmt.c (add_case_node): Likewise. * reload1.c (gen_reload): From-SVN: r127317
Diffstat (limited to 'gcc/tree-vect-transform.c')
-rw-r--r--gcc/tree-vect-transform.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index ac5c00d..8316aab 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -395,8 +395,8 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, enum tree_code reduc_code,
/* We have a whole vector shift available. */
if (VECTOR_MODE_P (mode)
- && optab->handlers[mode].insn_code != CODE_FOR_nothing
- && vec_shr_optab->handlers[mode].insn_code != CODE_FOR_nothing)
+ && optab_handler (optab, mode)->insn_code != CODE_FOR_nothing
+ && optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
/* Final reduction via vector shifts and the reduction operator. Also
requires scalar extract. */
outer_cost += ((exact_log2(nelements) * 2) * TARG_VEC_STMT_COST
@@ -1819,7 +1819,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
int vec_size_in_bits = tree_low_cst (TYPE_SIZE (vectype), 1);
tree vec_temp;
- if (vec_shr_optab->handlers[mode].insn_code != CODE_FOR_nothing)
+ if (optab_handler (vec_shr_optab, mode)->insn_code != CODE_FOR_nothing)
shift_code = VEC_RSHIFT_EXPR;
else
have_whole_vector_shift = false;
@@ -1835,7 +1835,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt,
else
{
optab optab = optab_for_tree_code (code, vectype);
- if (optab->handlers[mode].insn_code == CODE_FOR_nothing)
+ if (optab_handler (optab, mode)->insn_code == CODE_FOR_nothing)
have_whole_vector_shift = false;
}
@@ -2148,7 +2148,7 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
return false;
}
vec_mode = TYPE_MODE (vectype);
- if (optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing)
+ if (optab_handler (optab, vec_mode)->insn_code == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "op not supported by target.");
@@ -2228,7 +2228,7 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
fprintf (vect_dump, "no optab for reduction.");
epilog_reduc_code = NUM_TREE_CODES;
}
- if (reduc_optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing)
+ if (optab_handler (reduc_optab, vec_mode)->insn_code == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "reduc op not supported by target.");
@@ -3185,7 +3185,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
return false;
}
vec_mode = TYPE_MODE (vectype);
- icode = (int) optab->handlers[(int) vec_mode].insn_code;
+ icode = (int) optab_handler (optab, vec_mode)->insn_code;
if (icode == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
@@ -3701,9 +3701,9 @@ vect_strided_store_supported (tree vectype)
return false;
}
- if (interleave_high_optab->handlers[(int) mode].insn_code
+ if (optab_handler (interleave_high_optab, mode)->insn_code
== CODE_FOR_nothing
- || interleave_low_optab->handlers[(int) mode].insn_code
+ || optab_handler (interleave_low_optab, mode)->insn_code
== CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
@@ -3918,7 +3918,7 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
vec_mode = TYPE_MODE (vectype);
/* FORNOW. In some cases can vectorize even if data-type not supported
(e.g. - array initialization with 0). */
- if (mov_optab->handlers[(int)vec_mode].insn_code == CODE_FOR_nothing)
+ if (optab_handler (mov_optab, (int)vec_mode)->insn_code == CODE_FOR_nothing)
return false;
if (!STMT_VINFO_DATA_REF (stmt_info))
@@ -4234,7 +4234,7 @@ vect_strided_load_supported (tree vectype)
return false;
}
- if (perm_even_optab->handlers[mode].insn_code == CODE_FOR_nothing)
+ if (optab_handler (perm_even_optab, mode)->insn_code == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "perm_even op not supported by target.");
@@ -4249,7 +4249,7 @@ vect_strided_load_supported (tree vectype)
return false;
}
- if (perm_odd_optab->handlers[mode].insn_code == CODE_FOR_nothing)
+ if (optab_handler (perm_odd_optab, mode)->insn_code == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "perm_odd op not supported by target.");
@@ -4552,7 +4552,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
/* FORNOW. In some cases can vectorize even if data-type not supported
(e.g. - data copies). */
- if (mov_optab->handlers[mode].insn_code == CODE_FOR_nothing)
+ if (optab_handler (mov_optab, mode)->insn_code == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "Aligned load, but unsupported type.");