This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add support for adjusting the number of units in a mode


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?

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]