From: "Martin Liška" <mliska@suse.cz>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Jan Hubicka <hubicka@ucw.cz>,
Thomas Koenig <tkoenig@netcologne.de>,
Andrew Pinski <pinskia@gmail.com>, Jeff Law <law@redhat.com>,
GCC Development <gcc@gcc.gnu.org>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Add .gnu.lto_.meta section.
Date: Fri, 21 Jun 2019 12:49:00 -0000 [thread overview]
Message-ID: <bd3013b0-94a9-671b-6a1b-9de8421a6672@suse.cz> (raw)
In-Reply-To: <CAFiYyc2SWcVi8_J+n5uCKD+49uK1RgRq46iO3uf4TP9pfG_g5w@mail.gmail.com>
On 6/21/19 2:34 PM, Richard Biener wrote:
> On Fri, Jun 21, 2019 at 12:20 PM Martin Liška <mliska@suse.cz> wrote:
>>
>> Hi.
>>
>> The patch is about a new ELF section that will contain information
>> about LTO version. And for the future, used compression will be stored
>> here. The patch removes streaming of the version into each section.
>
> I'd like each section to have a header containing a compression method
> (compressed or not, and now zlib vs. zstd). We currently have a mix
> and knowledge is hidden.
That would be possible, good idea.
>
> I also remember I had old patches to make the data streamer compress
> the stream on-the-fly, not requiring the full uncompressed stream in
> memory and then re-access it for compression (needing more temporary
> memory). But IIRC the speedup was marginal.
>
> My thought is also that we should have exactly _one_ ELF section
> for the LTO bytecode and our own container inside (much like
> simple-object does for non-ELF). So having another one is, well, ugly ;)
Having N sections for all symbols (functions and variables) is handy because
we read some of the during WPA (by IPA ICF). So having all in a single section
would make decompression more complicated.
I'm going to prepare a patch that will pull out a LTO section header
from compressed stream.
Martin
>
>> Disadvantage is a format change that will lead to following errors when
>> LTO bytecode is used from a different version:
>>
>> $ gcc x.o
>> lto1: fatal error: bytecode stream in file âx.oâ generated with GCC compiler older than 10.0
>>
>> $ gcc-9 main.o
>> lto1: fatal error: bytecode stream in file âmain.oâ generated with LTO version 850.0 instead of the expected 8.0
>>
>> I've been testing the patch.
>> Thoughts?
>> Martin
next prev parent reply other threads:[~2019-06-21 12:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <89e98dc0-e766-ffef-da0f-263c3b284e96@suse.cz>
[not found] ` <ecf95d2c-bc83-1fef-3d0d-74db34d7f1ea@redhat.com>
[not found] ` <1BBDAEDD-9432-4B12-BA20-63A6E047FDB6@gmail.com>
[not found] ` <CA+=Sn1kaGR00rtVXDtDufk-68reSZC-K-y_a5O7UMoSH+YD1oQ@mail.gmail.com>
[not found] ` <20190619192954.edwdfxns3gx2gt5m@kam.mff.cuni.cz>
[not found] ` <CA+=Sn1np4H884eXM7H4LKeDj5Xppdy9y0WRbnbCqhhheUdjqyA@mail.gmail.com>
2019-06-20 9:08 ` [RFC] zstd as a compression algorithm for LTO Martin Liška
2019-06-20 10:59 ` Thomas Koenig
2019-06-20 11:42 ` Martin Liška
2019-06-20 12:02 ` Jan Hubicka
2019-06-21 10:20 ` [PATCH] Add .gnu.lto_.meta section Martin Liška
2019-06-21 12:34 ` Richard Biener
2019-06-21 12:49 ` Martin Liška [this message]
2019-06-21 12:57 ` Jan Hubicka
2019-06-21 14:01 ` Martin Liška
2019-06-24 12:02 ` Richard Biener
2019-06-24 12:12 ` Martin Liška
2019-06-24 12:44 ` Richard Biener
2019-06-24 13:31 ` Martin Liška
2019-06-24 14:25 ` Iain Sandoe
2019-06-24 18:05 ` Richard Biener
2019-06-25 8:14 ` Martin Liška
2019-06-25 14:15 ` Richard Biener
2019-06-27 12:28 ` [PATCH] Add .gnu.lto_.lto section Martin Liška
2019-07-01 10:59 ` Martin Liška
2019-07-01 11:01 ` [PATCH 2/2] Add zstd support for LTO bytecode compression Martin Liška
2019-07-02 20:50 ` Jeff Law
2019-07-02 20:49 ` [PATCH] Add .gnu.lto_.lto section Jeff Law
2019-06-20 12:12 ` [RFC] zstd as a compression algorithm for LTO Thomas Koenig
2019-06-20 17:02 ` Joseph Myers
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=bd3013b0-94a9-671b-6a1b-9de8421a6672@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=law@redhat.com \
--cc=pinskia@gmail.com \
--cc=richard.guenther@gmail.com \
--cc=tkoenig@netcologne.de \
/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).