GCC memory starvation caused by flatten attribute with LTO
Submitted by Martin Liska
Assigned to Chris Wilson @ickle
Description
Created attachment 97520
LTO patch
Hello,
I've been testing GCC 4.9 for a virtual gentoo machine and I noticed that you us flatten attribute in source code. In case of src/sna/sna_glyphs.c flatten functions, inliner inlines about 3.3M functions and crashes because of no free memory (I have 8GB memory).
Please notice that LTO has ability to optimize whole program. As a result, it sees almost all function bodies and that leads to enormous inlining.
Suggested patch removes these flatten attributes for selected functions.
Thank you,
MArtin
Attachment 97520, "LTO patch":
xf86-intel-drive.patch