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: [PATCH] Get rid of awkward precision for bitsize types


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
>


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