diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-08-30 11:18:59 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-08-30 11:18:59 +0000 |
commit | 095a2d76a26fa4ee17fa56bff21bf4f269db2368 (patch) | |
tree | 8ae047a4a1de314bb5626316e362e598a1fc4e2f /gcc/expmed.c | |
parent | d787ba568aa9bfa00c71f55b86ddb95a3d153db0 (diff) | |
download | gcc-095a2d76a26fa4ee17fa56bff21bf4f269db2368.zip gcc-095a2d76a26fa4ee17fa56bff21bf4f269db2368.tar.gz gcc-095a2d76a26fa4ee17fa56bff21bf4f269db2368.tar.bz2 |
[62/77] Big machine_mode to scalar_int_mode replacement
This patch changes the types of various things from machine_mode
to scalar_int_mode, in cases where (after previous patches)
simply changing the type is enough on its own. The patch does
nothing other than that.
2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
instead of a machine_mode.
(builtin_memset_read_str): Likewise.
* builtins.c (c_readstr): Likewise.
(builtin_memcpy_read_str): Likewise.
(builtin_strncpy_read_str): Likewise.
(builtin_memset_read_str): Likewise.
(builtin_memset_gen_str): Likewise.
(expand_builtin_signbit): Use scalar_int_mode for local variables.
* cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
instead of a machine_mode.
* combine.c (simplify_if_then_else): Use scalar_int_mode for local
variables.
(make_extraction): Likewise.
(try_widen_shift_mode): Take and return scalar_int_modes instead
of machine_modes.
* config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
a scalar_int_mode instead of a machine_mode.
* config/avr/avr.c (avr_addr_space_address_mode): Likewise.
(avr_addr_space_pointer_mode): Likewise.
* config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
* config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
(msp430_unwind_word_mode): Likewise.
* config/spu/spu.c (spu_unwind_word_mode): Likewise.
(spu_addr_space_pointer_mode): Likewise.
(spu_addr_space_address_mode): Likewise.
(spu_libgcc_cmp_return_mode): Likewise.
(spu_libgcc_shift_count_mode): Likewise.
* config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
(rl78_addr_space_pointer_mode): Likewise.
(fl78_unwind_word_mode): Likewise.
(rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
machine_mode.
* config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
* config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
* config/mips/mips.c (mips_mode_rep_extended): Likewise.
(mips_valid_pointer_mode): Likewise.
* config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
* config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
(ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
of a machine_mode.
(ft32_addr_space_address_mode): Likewise.
* config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
scalar_int_mode instead of a machine_mode.
(m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
of a machine_mode.
(m32c_addr_space_address_mode): Likewise.
* config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
(rs6000_eh_return_filter_mode): Likewise.
* config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
(rs6000_eh_return_filter_mode): Likewise.
* config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
(s390_libgcc_shift_count_mode): Likewise.
(s390_unwind_word_mode): Likewise.
(s390_valid_pointer_mode): Take a scalar_int_mode rather than a
machine_mode.
* target.def (mode_rep_extended): Likewise.
(valid_pointer_mode): Likewise.
(addr_space.valid_pointer_mode): Likewise.
(eh_return_filter_mode): Return a scalar_int_mode rather than
a machine_mode.
(libgcc_cmp_return_mode): Likewise.
(libgcc_shift_count_mode): Likewise.
(unwind_word_mode): Likewise.
(addr_space.pointer_mode): Likewise.
(addr_space.address_mode): Likewise.
* doc/tm.texi: Regenerate.
* dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
a machine_mode.
(do_jump): Use scalar_int_mode for local variables.
* dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
rather than a machine_mode.
* dwarf2out.c (convert_descriptor_to_mode): Likewise.
(scompare_loc_descriptor_wide): Likewise.
(scompare_loc_descriptor_narrow): Likewise.
* emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
variables.
* except.c (sjlj_emit_dispatch_table): Likewise.
(expand_builtin_eh_copy_values): Likewise.
* explow.c (convert_memory_address_addr_space_1): Likewise.
Take a scalar_int_mode rather than a machine_mode.
(convert_memory_address_addr_space): Take a scalar_int_mode rather
than a machine_mode.
(memory_address_addr_space): Use scalar_int_mode for local variables.
* expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
rather than a machine_mode.
* expmed.c (mask_rtx): Likewise.
(init_expmed_one_conv): Likewise.
(expand_mult_highpart_adjust): Likewise.
(extract_high_half): Likewise.
(expmed_mult_highpart_optab): Likewise.
(expmed_mult_highpart): Likewise.
(expand_smod_pow2): Likewise.
(expand_sdiv_pow2): Likewise.
(emit_store_flag_int): Likewise.
(adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
variables.
(extract_low_bits): Likewise.
* expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
a machine_mode.
* expr.c (pieces_addr::adjust): Likewise.
(can_store_by_pieces): Likewise.
(store_by_pieces): Likewise.
(clear_by_pieces_1): Likewise.
(expand_expr_addr_expr_1): Likewise.
(expand_expr_addr_expr): Use scalar_int_mode for local variables.
(expand_expr_real_1): Likewise.
(try_casesi): Likewise.
* final.c (shorten_branches): Likewise.
* fold-const.c (fold_convert_const_int_from_fixed): Change the
type of "mode" to machine_mode.
* internal-fn.c (expand_arith_overflow_result_store): Take a
scalar_int_mode rather than a machine_mode.
(expand_mul_overflow): Use scalar_int_mode for local variables.
* loop-doloop.c (doloop_modify): Likewise.
(doloop_optimize): Likewise.
* optabs.c (expand_subword_shift): Take a scalar_int_mode rather
than a machine_mode.
(expand_doubleword_shift_condmove): Likewise.
(expand_doubleword_shift): Likewise.
(expand_doubleword_clz): Likewise.
(expand_doubleword_popcount): Likewise.
(expand_doubleword_parity): Likewise.
(expand_absneg_bit): Use scalar_int_mode for local variables.
(prepare_float_lib_cmp): Likewise.
* rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
rather than a machine_mode.
(convert_memory_address_addr_space): Likewise.
(get_mode_bounds): Likewise.
(get_address_mode): Return a scalar_int_mode rather than a
machine_mode.
* rtlanal.c (get_address_mode): Likewise.
* stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
than a machine_mode.
* targhooks.c (default_mode_rep_extended): Likewise.
(default_valid_pointer_mode): Likewise.
(default_addr_space_valid_pointer_mode): Likewise.
(default_eh_return_filter_mode): Return a scalar_int_mode rather
than a machine_mode.
(default_libgcc_cmp_return_mode): Likewise.
(default_libgcc_shift_count_mode): Likewise.
(default_unwind_word_mode): Likewise.
(default_addr_space_pointer_mode): Likewise.
(default_addr_space_address_mode): Likewise.
* targhooks.h (default_eh_return_filter_mode): Likewise.
(default_libgcc_cmp_return_mode): Likewise.
(default_libgcc_shift_count_mode): Likewise.
(default_unwind_word_mode): Likewise.
(default_addr_space_pointer_mode): Likewise.
(default_addr_space_address_mode): Likewise.
(default_mode_rep_extended): Take a scalar_int_mode rather than
a machine_mode.
(default_valid_pointer_mode): Likewise.
(default_addr_space_valid_pointer_mode): Likewise.
* tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
local variables.
* tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
rather than a machine_mode.
* tree-switch-conversion.c (array_value_type): Use scalar_int_mode
for local variables.
* tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
* var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
than a machine_mode.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251513
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 3839c76..5873df4 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -72,8 +72,8 @@ static rtx extract_split_bit_field (rtx, opt_scalar_int_mode, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, int, bool); static void do_cmp_and_jump (rtx, rtx, enum rtx_code, machine_mode, rtx_code_label *); -static rtx expand_smod_pow2 (machine_mode, rtx, HOST_WIDE_INT); -static rtx expand_sdiv_pow2 (machine_mode, rtx, HOST_WIDE_INT); +static rtx expand_smod_pow2 (scalar_int_mode, rtx, HOST_WIDE_INT); +static rtx expand_sdiv_pow2 (scalar_int_mode, rtx, HOST_WIDE_INT); /* Return a constant integer mask value of mode MODE with BITSIZE ones followed by BITPOS zeros, or the complement of that if COMPLEMENT. @@ -81,7 +81,7 @@ static rtx expand_sdiv_pow2 (machine_mode, rtx, HOST_WIDE_INT); mask is zero-extended if BITSIZE+BITPOS is too small for MODE. */ static inline rtx -mask_rtx (machine_mode mode, int bitpos, int bitsize, bool complement) +mask_rtx (scalar_int_mode mode, int bitpos, int bitsize, bool complement) { return immed_wide_int_const (wi::shifted_mask (bitpos, bitsize, complement, @@ -118,8 +118,8 @@ struct init_expmed_rtl }; static void -init_expmed_one_conv (struct init_expmed_rtl *all, machine_mode to_mode, - machine_mode from_mode, bool speed) +init_expmed_one_conv (struct init_expmed_rtl *all, scalar_int_mode to_mode, + scalar_int_mode from_mode, bool speed) { int to_size, from_size; rtx which; @@ -478,7 +478,7 @@ adjust_bit_field_mem_for_reg (enum extraction_pattern pattern, { /* Limit the search to the mode required by the corresponding register insertion or extraction instruction, if any. */ - machine_mode limit_mode = word_mode; + scalar_int_mode limit_mode = word_mode; extraction_insn insn; if (get_best_reg_extraction_insn (&insn, pattern, GET_MODE_BITSIZE (best_mode), @@ -2269,7 +2269,7 @@ extract_split_bit_field (rtx op0, opt_scalar_int_mode op0_mode, rtx extract_low_bits (machine_mode mode, machine_mode src_mode, rtx src) { - machine_mode int_mode, src_int_mode; + scalar_int_mode int_mode, src_int_mode; if (mode == src_mode) return src; @@ -2600,9 +2600,9 @@ static void synth_mult (struct algorithm *, unsigned HOST_WIDE_INT, static rtx expand_mult_const (machine_mode, rtx, HOST_WIDE_INT, rtx, const struct algorithm *, enum mult_variant); static unsigned HOST_WIDE_INT invert_mod2n (unsigned HOST_WIDE_INT, int); -static rtx extract_high_half (machine_mode, rtx); -static rtx expmed_mult_highpart (machine_mode, rtx, rtx, rtx, int, int); -static rtx expmed_mult_highpart_optab (machine_mode, rtx, rtx, rtx, +static rtx extract_high_half (scalar_int_mode, rtx); +static rtx expmed_mult_highpart (scalar_int_mode, rtx, rtx, rtx, int, int); +static rtx expmed_mult_highpart_optab (scalar_int_mode, rtx, rtx, rtx, int, int); /* Compute and return the best algorithm for multiplying by T. The algorithm must cost less than cost_limit @@ -3645,7 +3645,7 @@ invert_mod2n (unsigned HOST_WIDE_INT x, int n) MODE is the mode of operation. */ rtx -expand_mult_highpart_adjust (machine_mode mode, rtx adj_operand, rtx op0, +expand_mult_highpart_adjust (scalar_int_mode mode, rtx adj_operand, rtx op0, rtx op1, rtx target, int unsignedp) { rtx tem; @@ -3670,7 +3670,7 @@ expand_mult_highpart_adjust (machine_mode mode, rtx adj_operand, rtx op0, /* Subroutine of expmed_mult_highpart. Return the MODE high part of OP. */ static rtx -extract_high_half (machine_mode mode, rtx op) +extract_high_half (scalar_int_mode mode, rtx op) { machine_mode wider_mode; @@ -3689,7 +3689,7 @@ extract_high_half (machine_mode mode, rtx op) optab. OP1 is an rtx for the constant operand. */ static rtx -expmed_mult_highpart_optab (machine_mode mode, rtx op0, rtx op1, +expmed_mult_highpart_optab (scalar_int_mode mode, rtx op0, rtx op1, rtx target, int unsignedp, int max_cost) { rtx narrow_op1 = gen_int_mode (INTVAL (op1), mode); @@ -3804,7 +3804,7 @@ expmed_mult_highpart_optab (machine_mode mode, rtx op0, rtx op1, MAX_COST is the total allowed cost for the expanded RTL. */ static rtx -expmed_mult_highpart (machine_mode mode, rtx op0, rtx op1, +expmed_mult_highpart (scalar_int_mode mode, rtx op0, rtx op1, rtx target, int unsignedp, int max_cost) { machine_mode wider_mode = GET_MODE_WIDER_MODE (mode).require (); @@ -3868,7 +3868,7 @@ expmed_mult_highpart (machine_mode mode, rtx op0, rtx op1, /* Expand signed modulus of OP0 by a power of two D in mode MODE. */ static rtx -expand_smod_pow2 (machine_mode mode, rtx op0, HOST_WIDE_INT d) +expand_smod_pow2 (scalar_int_mode mode, rtx op0, HOST_WIDE_INT d) { rtx result, temp, shift; rtx_code_label *label; @@ -3965,7 +3965,7 @@ expand_smod_pow2 (machine_mode mode, rtx op0, HOST_WIDE_INT d) This routine is only called for positive values of D. */ static rtx -expand_sdiv_pow2 (machine_mode mode, rtx op0, HOST_WIDE_INT d) +expand_sdiv_pow2 (scalar_int_mode mode, rtx op0, HOST_WIDE_INT d) { rtx temp; rtx_code_label *label; @@ -5630,7 +5630,7 @@ emit_store_flag_1 (rtx target, enum rtx_code code, rtx op0, rtx op1, rtx emit_store_flag_int (rtx target, rtx subtarget, enum rtx_code code, rtx op0, - rtx op1, machine_mode mode, int unsignedp, + rtx op1, scalar_int_mode mode, int unsignedp, int normalizep, rtx trueval) { machine_mode target_mode = target ? GET_MODE (target) : VOIDmode; |