From: "H.J. Lu" <hjl.tools@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
Andrew Pinski <pinskia@gmail.com>,
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: Fri, 5 Nov 2021 05:25:33 -0700 [thread overview]
Message-ID: <CAMe9rOr29Wa5NF5=xbHfbZ5HmAoQzbzMNwxVDZJjZzsFs48yVQ@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc1tnT7Sed_1AgJfuPttMa0hSgXKm=kCNuAqLVC6DngCtg@mail.gmail.com>
On Fri, Nov 5, 2021 at 3:01 AM Richard Biener
<richard.guenther@gmail.com> wrote:
>
> On Fri, Nov 5, 2021 at 7:54 AM Jakub Jelinek via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > On Thu, Nov 04, 2021 at 11:05:35PM -0700, Andrew Pinski via Gcc-patches wrote:
> > > > 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.
> >
> > I completely agree.
>
> Do we have permanent objects embedding wide[st]_int? I know of
> class loop and loop_bound. Btw, there are other targets with large
> integer modes (aarch64 with XImode) and not defining
> MAX_BITSIZE_MODE_ANY_INT
>
MAX_BITSIZE_MODE_ANY_INT was removed so that YMM and ZMM
registers can be used for by_pieces operations.
--
H.J.
next prev parent reply other threads:[~2021-11-05 12:26 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
2021-11-05 6:53 ` Jakub Jelinek
2021-11-05 10:01 ` Richard Biener
2021-11-05 12:25 ` H.J. Lu [this message]
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='CAMe9rOr29Wa5NF5=xbHfbZ5HmAoQzbzMNwxVDZJjZzsFs48yVQ@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=pinskia@gmail.com \
--cc=richard.guenther@gmail.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).