public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: Qing Zhao <qing.zhao@oracle.com>
Cc: gcc-patches Nick Alcock via <gcc-patches@gcc.gnu.org>
Subject: Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different
Date: Thu, 4 Nov 2021 23:05:35 -0700	[thread overview]
Message-ID: <CA+=Sn1=FfOkanTo+ZkYpfjoLUmuv1GUYmJvgnO6wHZLadGWO5w@mail.gmail.com> (raw)
In-Reply-To: <7B702DE8-7B94-4317-BC19-610D2F406759@oracle.com>

On Thu, Nov 4, 2021 at 1:38 PM Qing Zhao via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi,
>
> I noticed that the macro “WIDE_INT_MAX_ELTS” has different values in GCC11 and GCC12 (on the same X86 machine)
>
> For gcc11:
>
> wide int max elts =3
>
> For gcc12:
>
> wide int max elts =9
>
> Does anyone know what’s the reason for this difference?
>
> Thanks a lot for any help.

Yes originally, the x86 backend only used OI and XI modes for vectors
during data movement.
This changed with r10-5741-gc57b4c22089 which added the use of OI mode
for TImode adding with overflow and then MAX_BITSIZE_MODE_ANY_INT
changed from 128 to 160 (in r10-6178-gc124b345e46078) to fix the ICE
introduced by that change .
And then with r12-979-g782e57f2c09 removed the define of
MAX_BITSIZE_MODE_ANY_INT.
Now what was not mentioned in r12-979-g782e57f2c09 (or before) of why
MAX_BITSIZE_MODE_ANY_INT was defined in the first place for x86. HJL
assumed there was some problem of why it was defined that way but not
realizing memory usage was the reason.
It was defined to keep the memory usage down as you see that it is now
almost a 3x memory increase for all wi::wide_int.
I do think r12-979-g782e57f2c09 should be reverted with an added
comment on saying defining MAX_BITSIZE_MODE_ANY_INT here is to
decrease the memory footprint.


Thanks,
Andrew Pinski

>
> Qing

  parent reply	other threads:[~2021-11-05  6:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 20:37 Qing Zhao
2021-11-05  1:34 ` Kewen.Lin
2021-11-05  6:05 ` Andrew Pinski [this message]
2021-11-05  6:53   ` Jakub Jelinek
2021-11-05 10:01     ` Richard Biener
2021-11-05 12:25       ` H.J. Lu
2021-11-05 16:11       ` Qing Zhao
2021-11-05 16:17         ` Jakub Jelinek
2021-11-05 17:37           ` Qing Zhao
2021-11-06  9:56             ` Jakub Jelinek
2021-11-08  8:41               ` Richard Biener
2021-11-08 23:47                 ` Qing Zhao
2021-11-09  7:13                   ` Richard Biener
2021-11-09  9:10                     ` Jakub Jelinek
2021-11-09 10:44                       ` Richard Biener
2021-11-09 17:19                         ` Qing Zhao
2021-11-10  8:37                           ` Richard Biener
2021-11-10 18:02                             ` Qing Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+=Sn1=FfOkanTo+ZkYpfjoLUmuv1GUYmJvgnO6wHZLadGWO5w@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=qing.zhao@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).