This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Get rid of awkward precision for bitsize types
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 Apr 2009 12:24:44 +0200
- Subject: Re: [PATCH] Get rid of awkward precision for bitsize types
- References: <200904061224.16916.ebotcazou@adacore.com>
On Mon, Apr 6, 2009 at 12:24 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> the base formula to compute it is (oprecision + BITS_PER_UNIT_LOG + 1) where
> oprecision is the precision of sizetype; this yields 36 for typical 32-bit
> targets so bitsize types are DImode integer types with 36-bit precision.
>
> This means that the RTL expander will generate mask and shift instructions to
> maintain the precision, for example 1.2 MB out of 85 MB at -O0 for a big Ada
> application.
>
> An approach to eliminating this unwanted effect would be to exclude sizetypes
> from the RTL expander treatment; another is to make it so that bitsize types
> use the full precision of their machine mode.
>
> Tested on i586-suse-linux, OK for mainline?
I know that sizetypes "do not overflow" (err, well ...) - but do you
realize that doing this makes overflow behavior different between
a computation in sizetype and one in bitsizetype with bit
quantities?
Thanks,
Richard.
>
> 2009-04-06 ?Eric Botcazou ?<ebotcazou@adacore.com>
>
> ? ? ? ?* stor-layout.c (set_sizetype): Use the full precision of their
> ? ? ? ?machine mode for bitsize types.
>
>
> --
> Eric Botcazou
>