This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add support for adjusting the number of units in a mode
- 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: Sun, 19 Nov 2017 16:47:49 -0700
- Subject: Re: Add support for adjusting the number of units in a mode
- Authentication-results: sourceware.org; auth=none
- References: <87k1zjte2n.fsf@linaro.org> <ede03f20-6b36-c2e0-2c45-7a7514531c0a@redhat.com> <87h8u3pv4j.fsf@linaro.org>
On 11/09/2017 04:08 AM, Richard Sandiford wrote:
> Jeff Law <law@redhat.com> writes:
>> On 10/25/2017 09:57 AM, Richard Sandiford wrote:
>>> We already allow the target to change the size and alignment of a mode.
>>> This patch does the same thing for the number of units, which is needed
>>> to give command-line control of the SVE vector length.
>>>
>>> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu,
>>> on top of the poly_int series. I think I can approve this under the
>>> gen* maintainership, so if there are no comments in the menatime,
>>> I'll apply it if the prerequisites are approved.
>>>
>>> Thanks,
>>> Richard
>>>
>>>
>>> 2017-10-25 Richard Sandiford <richard.sandiford@linaro.org>
>>> Alan Hayward <alan.hayward@arm.com>
>>> David Sherwood <david.sherwood@arm.com>
>>>
>>> gcc/
>>> * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
>>> (mode_nunits): Likewise CONST_MODE_NUNITS.
>>> * machmode.def (ADJUST_NUNITS): Document.
>>> * genmodes.c (mode_data::need_nunits_adj): New field.
>>> (blank_mode): Update accordingly.
>>> (adj_nunits): New variable.
>>> (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
>>> parameter.
>>> (emit_mode_size_inline): Set need_bytesize_adj for all modes
>>> listed in adj_nunits.
>>> (emit_mode_nunits_inline): Set need_nunits_adj for all modes
>>> listed in adj_nunits. Don't emit case statements for such modes.
>>> (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
>>> and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
>>> nothing if adj_nunits is nonnull.
>>> (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
>>> (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
>>> (emit_mode_fbit): Update use of print_maybe_const_decl.
>>> (emit_move_size): Likewise. Treat the array as non-const
>>> if adj_nunits.
>>> (emit_mode_adjustments): Handle adj_nunits.
>> Were all the prereqs here approved? Or does this depend on the poly_int
>> stuff?
>
> Yeah, it depends on the poly_int stuff. Not in a major way though --
> I could reorder it if necessary.
Your call. I figure it's going to be at least a week working my way
through the rest of poly_int. I keep hoping to see groups of patches
within that kit that I can trivially look at and say, yea, of course
this is good. But it hasn't really happened yet.
jeff