public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: "Martin Liška" <mliska@suse.cz>
Cc: Richard Biener <richard.guenther@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.
Date: Mon, 09 Sep 2019 14:33:00 -0000	[thread overview]
Message-ID: <20190909143343.2tf2tc3mvnhwcqur@kam.mff.cuni.cz> (raw)
In-Reply-To: <289c7087-008d-1921-fe78-80a3e1abd986@suse.cz>

> PING^1
> 
> On 8/26/19 12:04 PM, Martin Liška wrote:
> > Ok. I have a semi-working patch that has issues for inline clones.
> > When we call cgraph_node::get_untransformed_body for an inline clone,
> > then one needs to use clone_of->order to find proper LTO stream.

This seems OK to me - when using inline clone we really look for a body
of its master, so that seems OK.
> > 
> > What's more problematic is that such clone can be expanded:
> > 
> > f/12 (f) @0x7ffff769f708
> >   Type: function definition analyzed
> >   Visibility: external public
> >   References: mumble.lto_priv.0/8 (write)
> >   Referring: 
> >   Read from file: /tmp/cciAkXHp.ltrans1.o
> >   Function f/12 is inline copy in main/0
> >   Availability: local
> >   Function flags: count:1073741824 (estimated locally) local nonfreeing_fn executed_once
> >   Called by: main/0 (inlined) (1073741824 (estimated locally),1.00 per call) 
> >   Calls: 
> > 
> > and lost. So we end up with an orphan and we ICE with:

We do some work on removing unnecesary master clone when function is
fully inlined and I guess in that case you lose the order info.
One option would be to copy order into all inline clones (it does not
have very good meaning there) or do that when reshaping the tree.
This is done in cgraph_node::remove at the place clone_of is
manipulated.
This is probably bit cleaner.
> > 
> > /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/lto/20081112_0.c: In function ‘main’:
> > /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/lto/20081112_0.c:10:3: fatal error: /tmp/cciAkXHp.ltrans1.o: section f is missing
> > 
> > So usage of symtab_node::order seems awkward to me :/
> > 
> > Martin
> > 
> 

  reply	other threads:[~2019-09-09 14:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 15:19 Martin Liška
2019-08-12 10:39 ` Richard Biener
2019-08-12 10:43   ` Martin Liška
2019-08-12 10:46     ` Richard Biener
2019-08-12 10:50       ` Martin Liška
2019-08-12 10:58         ` Richard Biener
2019-08-12 11:01           ` Richard Biener
2019-08-12 10:52       ` Richard Biener
2019-08-15 14:57   ` Jan Hubicka
2019-08-16  9:11     ` Richard Biener
2019-08-23 13:20     ` Martin Liška
2019-08-23 14:00       ` Martin Liška
2019-08-23 15:39         ` Jan Hubicka
2019-08-23 15:43           ` Martin Liška
2019-08-23 16:32             ` Jan Hubicka
2019-08-23 16:42               ` Martin Liška
2019-08-23 23:18                 ` Jan Hubicka
2019-08-26 11:54                   ` Martin Liška
2019-09-09 12:39                     ` Martin Liška
2019-09-09 14:33                       ` Jan Hubicka [this message]
2019-09-11 11:38                         ` Martin Liška
2019-09-18 10:14                           ` Martin Liška
2019-10-22 11:15                             ` Martin Liška
2019-10-29 11:34                               ` Martin Liška
2019-10-29 14:51                                 ` Jan Hubicka
2019-10-30 10:11                                   ` Martin Liška

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=20190909143343.2tf2tc3mvnhwcqur@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    --cc=richard.guenther@gmail.com \
    /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).