aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.h
AgeCommit message (Collapse)AuthorFilesLines
2013-01-10Update copyright years in gcc/Richard Sandiford1-3/+1
From-SVN: r195098
2012-08-01Allow MODE_PARTIAL_INT in expmed costsRichard Henderson1-46/+40
From-SVN: r190050
2012-07-31expmed.h (NUM_MODE_VECTOR_INT): Define.Nathan Froyd1-26/+98
* expmed.h (NUM_MODE_VECTOR_INT): Define. (struct expmed_op_cheap, struct expmed_op_costs): New structures. (struct target_expmed): Convert x_mul_highpart_cost and x_mul_widen_cost fields to be indexed by integer modes. Convert x_sdiv_pow2_cheap and x_smod_pow2_cheap fields to be of type struct expmed_op_cheap. Convert other cost fields to be of type struct_expmed_op_costs. (mul_widen_cost_ptr, mul_highpart_cost_ptr): Adjust for new indexing of respective fields. (expmed_op_cheap_ptr): New function. (sdiv_pow2_cheap_ptr, smod_pow2_cheap_ptr): Call it. (expmed_op_cost_ptr): New function. (add_cost_ptr, neg_cost_ptr, shift_cost_ptr, shiftadd_cost_ptr, shiftsub0_cost_ptr, shiftsub1_cost_ptr, mul_cost_ptr, sdiv_cost_ptr, udiv_cost_ptr): Call it. From-SVN: r189994
2012-07-27expmed.h (alg_hash, [...]): Delete macro definitions and re-purpose as ↵Nathan Froyd1-46/+395
inline functions. * expmed.h (alg_hash, alg_hash_used_p, sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, neg_cost, shift_cost) shiftadd_cost, shiftsub0_cost, shiftsub1_cost, mul_cost, sdiv_cost, udiv_cost, mul_widen_cost, mul_highpart_cost): Delete macro definitions and re-purpose as inline functions. (alg_hash_entry_ptr, set_alg_hash_used_p, sdiv_pow2_cheap_ptr, set_sdiv_pow2_cheap, smod_pow2_cheap_ptr, set_smod_pow2_cheap, zero_cost_ptr, set_zero_cost, add_cost_ptr, set_add_cost, neg_cost_ptr, set_neg_cost, shift_cost_ptr, set_shift_cost, shiftadd_cost_ptr, set_shiftadd_cost, shiftsub0_cost_ptr, set_shiftsub0_cost, shiftsub1_cost_ptr, set_shiftsub1_cost, mul_cost_ptr, set_mul_cost, sdiv_cost_ptr, set_sdiv_cost, udiv_cost_ptr, set_udiv_cost, mul_widen_cost_ptr, set_mul_widen_cost, mul_highpart_cost_ptr, set_mul_highpart_cost): New functions. (convert_cost_ptr): New function, split out from... (set_convert_cost, convert_cost): ...here. * expmed.c, tree-ssa-loop-ivopts.c: Update for new functions. * gimple-ssa-strength-reduction.c: Likewise. From-SVN: r189919
2012-07-26tree-ssa-loop-ivopts.c (mbc_entry_hash): Remove.Bill Schmidt1-0/+46
2012-07-26 Bill Schmidt <wschmidt@linux.ibm.com> * tree-ssa-loop-ivopts.c (mbc_entry_hash): Remove. (mbc_entry_eq): Likewise. (mult_costs): Likewise. (cost_tables_exist): Likewise. (initialize_costs): Likewise. (finalize_costs): Likewise. (tree_ssa_iv_optimize_init): Remove call to initialize_costs. (add_regs_cost): Remove. (multiply_regs_cost): Likewise. (add_const_cost): Likewise. (extend_or_trunc_reg_cost): Likewise. (negate_reg_cost): Likewise. (struct mbc_entry): Likewise. (multiply_by_const_cost): Likewise. (get_address_cost): Change add_regs_cost calls to add_cost lookups; change multiply_by_const_cost to mult_by_coeff_cost. (force_expr_to_var_cost): Likewise. (difference_cost): Change multiply_by_const_cost to mult_by_coeff_cost. (get_computation_cost_at): Change add_regs_cost calls to add_cost lookups; change multiply_by_const_cost to mult_by_coeff_cost. (determine_iv_cost): Change add_regs_cost calls to add_cost lookups. (tree_ssa_iv_optimize_finalize): Remove call to finalize_costs. * tree-ssa-address.c (expmed.h): New #include. (most_expensive_mult_to_index): Change multiply_by_const_cost to mult_by_coeff_cost. * gimple-ssa-strength-reduction.c (expmed.h): New #include. (stmt_cost): Change to use mult_by_coeff_cost, mul_cost, add_cost, neg_cost, and convert_cost instead of IVOPTS interfaces. (execute_strength_reduction): Remove calls to initialize_costs and finalize_costs. * expmed.c (struct init_expmed_rtl): Add convert rtx_def. (init_expmed_one_mode): Initialize convert rtx_def; initialize x_convert_cost for related modes. (mult_by_coeff_cost): New function. * expmed.h (NUM_MODE_INT): New #define. (struct target_expmed): Add x_convert_cost matrix. (set_convert_cost): New inline function. (convert_cost): Likewise. (mult_by_coeff_cost): New extern decl. * tree-flow.h (initialize_costs): Remove decl. (finalize_costs): Likewise. (multiply_by_const_cost): Likewise. (add_regs_cost): Likewise. (multiply_regs_cost): Likewise. (add_const_cost): Likewise. (extend_or_trunc_reg_cost): Likewise. (negate_reg_cost): Likewise. * Makefile.in (gimple-ssa-strength-reduction.o): Update dependencies. (tree-ssa-address.o): Update dependencies. From-SVN: r189890
2010-07-13expmed.h (MAX_BITS_PER_WORD): Move to...Richard Sandiford1-8/+0
gcc/ * expmed.h (MAX_BITS_PER_WORD): Move to... * defaults.h (MAX_BITS_PER_WORD): ...here. From-SVN: r162150
2010-07-13expmed.c (MAX_BITS_PER_WORD): Moved to expmed.h.Ramana Radhakrishnan1-0/+8
2010-07-13 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> * expmed.c (MAX_BITS_PER_WORD): Moved to expmed.h. * expmed.h (MAX_BITS_PER_WORD): Moved from expmed.c From-SVN: r162133
2010-07-12gcc/Richard Sandiford1-0/+114
* expmed.h (alg_code, mult_cost, MULT_COST_LESS, CHEAPER_MULT_COST) (algorithm, alg_hash_entry, NUM_ALG_HASH_ENTRIES, alg_hash): Moved from expmed.c. (target_expmed): Add x_alg_hash and x_alg_hash_used_p. (alg_hash, alg_hash_used_p): New macros. * expmed.c (init_expmed): Clear alg_hash if reinitializing. (alg_code, mult_cost, MULT_COST_LESS, CHEAPER_MULT_COST, algorithm) (alg_hash_entry, NUM_ALG_HASH_ENTRIES, alg_hash): Moved to expmed.h. From-SVN: r162104
2010-07-12Makefile.in (expmed.o, [...]): Depend on expmed.h.Richard Sandiford1-0/+86
gcc/ * Makefile.in (expmed.o, target-globals.o): Depend on expmed.h. * expmed.h: New file. * expmed.c (default_target_costs): New variable. (this_target_costs): New conditional variable. (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost, neg_cost) (shift_cost, shiftadd_cost, shiftsub0_cost, shiftsub1_cost, mul_cost) (sdiv_cost, udiv_cost, mul_widen_cost, mul_highpart_cost): Delete. * target-globals.h (this_target_expmed): Declare. (target_globals): Add a expmed field. (restore_target_globals): Copy the expmed field to this_target_expmed. * target-globals.c: Include expmed.h. (default_target_globals): Initialize the expmed field. (save_target_globals): Likewise. From-SVN: r162094