This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is there a way to dump LTO IR?
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 26 Jan 2015 09:57:15 +0100
- Subject: Re: Is there a way to dump LTO IR?
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOqixqZhpbO3tFCVcow2TUtUY65RfbEtBv0zmkfd63ChjA at mail dot gmail dot com>
On Fri, Jan 23, 2015 at 9:26 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64754
>
> is a LTO bug where stage 1 and stage 2 compilers generate
> different LTO IR. Is there a way to dump LTO IR to see the
> actual difference in LTO IR?
No. I've had multiple incarnations of local patches to dump stuff
during LTO IR write and LTO IR read so I could match them but
never committed anything because all this stuff is in the hot path.
I wonder if we can make a GCC plugin do it though, via re-using
existing lto/tree-streamer.c and some preprocessor defines that
switches between plugin and GCC mode...
OTOH I had the idea to make the IL self-descriptive to some extent
(in a debug mode, of course).
Richard.
> Thanks.
>
> --
> H.J.