From: Hi-Angel <hiangel999@gmail.com>
To: Jun Ma <majun4950646@gmail.com>
Cc: "Bin.Cheng" <amker.cheng@gmail.com>,
Steve Ellcey <sellcey@marvell.com>,
"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: GCC missing -flto optimizations? SPEC lbm benchmark
Date: Fri, 15 Feb 2019 12:45:00 -0000 [thread overview]
Message-ID: <CAHGDjgB+jtuum0u7RF5-BeamO+hAsUvSyiXdsPKEmJBLaZQb_Q@mail.gmail.com> (raw)
In-Reply-To: <CABT63J4+=ihYHkEWy6aZwawYu5Z6Y4wErCmZVLkzLBLv3tVE9w@mail.gmail.com>
I never could understand, why field reordering was removed from GCC? I
mean, I know that it's prohibited in C and C++, but, sure, GCC can
detect whether it possibly can influence application behavior, and if
not, just do the reorder.
The veto is important to C/C++ as programming languages, but not to
machine code that is being generated from them. As long as app can't
detect that its fields were reordered through means defined by C/C++,
field reordering by compiler is fine, isn't it?
On Fri, 15 Feb 2019 at 12:49, Jun Ma <majun4950646@gmail.com> wrote:
>
> Bin.Cheng <amker.cheng@gmail.com> 于2019年2月15日周五 下午5:12写道:
>
> > On Fri, Feb 15, 2019 at 3:30 AM Steve Ellcey <sellcey@marvell.com> wrote:
> > >
> > > I have a question about SPEC CPU 2017 and what GCC can and cannot do
> > > with -flto. As part of some SPEC analysis I am doing I found that with
> > > -Ofast, ICC and GCC were not that far apart (especially spec int rate,
> > > spec fp rate was a slightly larger difference).
> > >
> > > But when I added -ipo to the ICC command and -flto to the GCC command,
> > > the difference got larger. In particular the 519.lbm_r was more than
> > > twice as fast with ICC and -ipo, but -flto did not help GCC at all.
> > >
> > > There are other tests that also show this type of improvement with -ipo
> > > like 538.imagick_r, 544.nab_r, 525.x264_r, 531.deepsjeng_r, and
> > > 548.exchange2_r, but none are as dramatic as 519.lbm_r. Anyone have
> > > any idea on what ICC is doing that GCC is missing? Is GCC just not
> > > agressive enough with its inlining?
> >
> > IIRC Jun did some investigation before? CCing.
> >
> > Thanks,
> > bin
> > >
> > > Steve Ellcey
> > > sellcey@marvell.com
>
> ICC is doing much more than GCC in ipo, especially memory layout
> optimizations. See https://software.intel.com/en-us/node/522667.
> ICC is more aggressive in array transposition/structure splitting
> /field reordering. However, these optimizations have been removed
> from GCC long time ago.
> As for case lbm_r, IIRC a loop with memory access which stride is 20 is
> most time-consuming. ICC will optimize the array(maybe structure?)
> and vectorize the loop under ipo.
>
> Thanks
> Jun
next prev parent reply other threads:[~2019-02-15 12:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 19:30 Steve Ellcey
2019-02-15 9:12 ` Bin.Cheng
2019-02-15 9:48 ` Jun Ma
2019-02-15 12:45 ` Hi-Angel [this message]
2019-02-15 13:12 ` Richard Biener
2019-02-15 13:15 ` Jakub Jelinek
2019-02-15 13:34 ` Ramana Radhakrishnan
2019-02-15 15:01 ` Ian Lance Taylor
2019-02-15 18:10 ` Joel Sherrill
2019-02-15 18:28 ` Richard Kenner
2019-02-15 20:52 ` Eric Botcazou
2019-02-15 17:53 ` [EXT] " Steve Ellcey
2019-02-16 14:36 ` Jun Ma
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=CAHGDjgB+jtuum0u7RF5-BeamO+hAsUvSyiXdsPKEmJBLaZQb_Q@mail.gmail.com \
--to=hiangel999@gmail.com \
--cc=amker.cheng@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=majun4950646@gmail.com \
--cc=sellcey@marvell.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).