On Nov 18, 2011 11:35 PM, "Pandu Poluan" <pa...@poluan.info> wrote:
>
>
> On Nov 18, 2011 10:41 PM, "Fredric Johansson" <fredric.miscm...@gmail.com>
wrote:
> >
> > On Wed, Nov 16, 2011 at 2:58 PM, Pandu Poluan <pa...@poluan.info> wrote:
> > >

-----snip

> > >
> > > I've been using USE "graphite" since gcc-4.5.3-r1 appeared. Upstream
says
> > > that graphite is stable, feature-complete, and production-ready since
4.5.3.
> > >
> > > To fully taste the effect of graphite, I even went the torturous
route of
> > > emerging gcc + libtool + binutils (in that order) twice, followed by a
> > > wholesale-rebuild of everything (emerge --emptytree), then tarballed
the
> > > result to my own "stage3.1" tarball to spare me the *huge* amount of
time
> > > required.
> > >
> > > I've deployed 3 systems with USE "graphite", and they *felt* snappier.
> > > emerge's *felt* slower, though. (no objective tests, I know).
> > >
> > > I use Gentoo as a gatewall, and there I did a wholesale-rebuild one
more
> > > time, this time specifying CFLAGS "-march=native"... and I just
couldn't be
> > > happier with the resulting performance :-)
> > >
> > > Rgds,
> > >
> >
> > I might be wrong but don't you need to have the gcc's options for
> > graphite enabled to actually make use of the graphite framework? (You
> > might be using them but you haven't mentioned it.)
> >
>
> Yes. There are some CFLAGS incantations to add to fully utilize graphite,
else the optimizations would be marginal at best.
>
> That said, turning on the CFLAGS flags was a *very* involved process:
>
> 1. By default, "graphite" is disabled. So you can't directly turn on the
graphite-related CFLAGS option. You must first enable USE "graphite" and
re-emerge gcc (or upgrade, if you're still using <gcc-4.5.3). This will
pull in ppl and cloog-ppl.
>
> 2. I don't know if libtool and binutils need to be remerged, but I did it
just to be safe.
>
> 3. Now that gcc has been compiled with graphite support, you can turn on
the CFLAGS flags necessary to fully utilize graphite. WARNING: some flags
recommended by upstream *might* make some programs run worse; be careful.
(I won't have access to my servers so I can't tell you which ones exactly).
>
> 4. At this point, I want gcc itself to be optimized. So, I remerged gcc
and libtool and binutils (in that order). Might be unnecessary, but I'm
anal like that :-)
>
> 5. Finally, universe-remerge (emerge --emptytree).
>
> As you can see, steps 4 & 5 are optional. And they indeed took a
*humongous* time to complete. But I am quite satisfied with the result.
Everything felt snappier compared to older boxen that haven't been
graphite-ed :-)
>
> Of course, YMMV.
>

Okay, found a forum thread discussing graphite and the proper CFLAGS:

http://forums.gentoo.org/viewtopic-t-850087.html

IIRC my CFLAGS looks very similar to the once @genstorm uses (scroll down
to approximately 80% down the page).

Now I never experienced *any* emerge failure, provided that I don't go
higher than MAKEOPTS="-j3". Set it higher and several packages failed
during compile. I don't know whose fault is that, but you've been warned
;-)

Rgds,

Reply via email to