This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [39/77] Two changes to the get_best_mode interface
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Wed, 16 Aug 2017 10:50:32 -0600
- Subject: Re: [39/77] Two changes to the get_best_mode interface
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AAEFF4ACB4
- References: <8760ewohsv.fsf@linaro.org> <87h8yghg6q.fsf@linaro.org>
On 07/13/2017 02:52 AM, Richard Sandiford wrote:
> get_best_mode always returns a scalar_int_mode on success,
> so this patch makes that explicit in the type system. Also,
> the "largest_mode" argument is used simply to provide a maximum
> size, and in practice that size is always a compile-time constant,
> even when the concept of variable-sized modes is added later.
> The patch therefore passes the size directly.
>
> 2017-07-13 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
> to a scalar_int_mode instead of a machine_mode.
> (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
> (get_best_mode): Return a boolean and use a pointer argument to store
> the selected mode. Replace the limit mode parameter with a bit limit.
> * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
> for the values returned by bit_field_mode_iterator::next_mode.
> (store_bit_field): Update call to get_best_mode.
> (store_fixed_bit_field): Likewise.
> (extract_fixed_bit_field): Likewise.
> * expr.c (optimize_bitfield_assignment_op): Likewise.
> * fold-const.c (optimize_bit_field_compare): Likewise.
> (fold_truth_andor_1): Likewise.
> * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
> Update for new type of m_mode.
> (get_best_mode): As above.
>
OK.
jeff