[Bug 77580] GCC memory starvation caused by flatten attribute with LTO

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 15 01:57:04 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=77580

--- Comment #4 from Patrick McMunn <doctorwhoguy at gmail.com> ---
I know it's been a while since I followed up. First of all, I don't know how to
generate a perf report, so that's partly why I didn't follow up sooner. Perhaps
you can point me to a tutorial?

Also, in retrospect, I suppose there's a possibility that I may have compiled
incorrectly. They -flto compiler flag, as well as the same compiler
optimization flags used during compilation, must also be used during the
linking phase. I use Funtoo, a variant of Gentoo, and I had -flto in my
CFLAGS/CXXFLAGS but not in my LDFLAGS. This is handled by different programs
makefiles. Some automatically add CXXFLAGS to LDFLAGS during the linking phase;
some don't. I'm not sure about xf86-video-intel's linking phase. So it's
possible that, in my earlier attempt, it wasn't linked and optimized properly.
So I should probably revisit that.

In my earlier attempt, I was using GCC 4.9.3. Since that time, I've been using
GCC 5.3.0 and, more recently, 6.1.0. GCC 5 and 6 fail the compilation phase
before it even gets to the linking phase. Though that can be resolved by
removing a few force_inline directives in the source code. In fact, I tried
removing every instance of force_inline, and it not only allowed compilation to
complete, it slightly reduced the memory used during linking. Alas linking
still failed, apparently due to using too much memory.

Anyway, I'll give your patch another go just in case what I described above is
what caused poorer performance with the LTO build. I really would like to get
LTO working with this driver. LTO has really improved a lot in GCC with the
6.1.0 release.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20160715/9a78ad98/attachment.html>


More information about the intel-gfx-bugs mailing list