On Mon, Jul 13, 2020 at 4:50 PM Roger Sayle <ro...@nextmovesoftware.com> wrote:
>
>
> Hi Richard,
>
> > It seems to be improving TARGET_TRULY_NOOP_TRUNCATION documentation might 
> > be useful here.
>
> This is an excellent suggestion.  How about the following/attached:
>
> 2020-07-13  Roger Sayle  <ro...@nextmovesoftware.com>
>
> gcc/ChangeLog:
>         * doc/tm.texi (TARGET_TRULY_NOOP_TRUNCATION): Clarify that targets
>         that (sometimes) return false, indicating SUBREGs shouldn't be
>         used, also need to provide a trunc?i?i2 optab that performs this
>         truncation.
>
> > The only user (after your patch) of this hook is in function.c for the 
> > function parameter setup btw.
>
> The targetm.truly_noop_truncation in assign_parm_setup_block is the last 
> place that calls this
> hook directly (with sizes), but the majority of uses go via 
> TRULY_NOOP_TRUNCATION_MODES_P
> as defined in machmode.h.
>
> I'll prepare a patch to switch function.c to use TRULY_NOOP_TRUNCATION_MODE_P 
> so that we
> are consistent throughout the compiler.  In theory, this hook could then be 
> changed to take modes
> instead of (poly_unit64) sizes, but that clean-up might be tricky without 
> access to the affected
> platforms.
>
> The hard register semantics that you're referring to are related to 
> TARGET_MODES_TIEABLE_P,
> which is documented to have interesting interactions with 
> TARGET_TRULY_NOOP_TRUNCATION.
>
> Is the above documentation change Ok for mainline?

OK.

Thanks,
Richard.

> Thanks,
> Roger
> --
>

Reply via email to