This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Turn TRULY_NOOP_TRUNCATION into a hook
- 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: Thu, 14 Sep 2017 10:55:37 -0600
- Subject: Re: Turn TRULY_NOOP_TRUNCATION into a hook
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.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 700BF883D4
- References: <8760cmbe0l.fsf@linaro.org>
On 09/13/2017 01:21 PM, Richard Sandiford wrote:
> I'm not sure the documentation is correct that outprec is always less
> than inprec, and each non-default implementation tested for the case
> in which it wasn't, but the patch leaves it as-is.
While the non-default implementations may always test for that case, I
don't think is makes much, if any sense. It could well be all the
implementations starting from a common base when TURLY_NOOP_TRUNCATION
was added and just getting copied over time.
I'd fully support someone doing some instrumentation to verify we're not
seeing outprec >= inprec, then removing those checks independently.
>
> The SH port had a couple of TRULY_NOOP_TRUNCATION tests that were left
> over from the old shmedia port.
shmedia is a subset (or mode) for sh5, right? If so, then it can just
go away.
>
> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu.
> Also tested by comparing the testsuite assembly output on at least one
> target per CPU directory. OK to install?
>
> Richard
>
>
> 2017-09-13 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayard <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * target.def (truly_noop_truncation): New hook.
> (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
> than TRULY_NOOP_TRUNCATION.
> * hooks.h (hook_bool_uint_uint_true): Declare.
> * hooks.c (hook_bool_uint_uint_true): New function.
> * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
> (TARGET_TRULY_NOOP_TRUNCATION): ...this.
> * doc/tm.texi: Regenerate.
> * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
> rather than TRULY_NOOP_TRUNCATION in comments.
> (simplify_comparison): Likewise.
> (record_truncated_value): Likewise.
> * expmed.c (extract_bit_field_1): Likewise.
> (extract_split_bit_field): Likewise.
> * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
> instead of TRULY_NOOP_TRUNCATION.
> * function.c (assign_parm_setup_block): Likewise.
> * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
> * rtlhooks.c: Include target.h.
> * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/mips/mips.c (mips_truly_noop_truncation): New function.
> (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
> * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
> rather than TRULY_NOOP_TRUNCATION in comments.
> * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
> rather than TRULY_NOOP_TRUNCATION in comments.
> * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
> TRULY_NOOP_TRUNCATION condition.
> (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
> (TRULY_NOOP_TRUNCATION): Delete.
> * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/spu/spu.c (spu_truly_noop_truncation): New function.
> (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
> * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
> (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
> * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
> rather than TRULY_NOOP_TRUNCATION in comments.
> * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
> * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
> * system.h (TRULY_NOOP_TRUNCATION): Poison.
I really thought we had more variety in the definitions of
TRULY_NOOP_TRUNCATION.
OK.