public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: Richard Guenther <rguenther@suse.de>, Jan Hubicka <jh@suse.cz>,
	       gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Clear DECL_SECTION_NAME during cgraph_create_virtual_clone (PR tree-optimization/43801)
Date: Wed, 30 Jun 2010 08:52:00 -0000	[thread overview]
Message-ID: <20100630054936.GR25077@tyan-ft48-01.lab.bos.redhat.com> (raw)
In-Reply-To: <20100630021255.GE12113@atrey.karlin.mff.cuni.cz>

On Wed, Jun 30, 2010 at 04:12:55AM +0200, Jan Hubicka wrote:
> > When a fndecl is DECL_ONE_ONLY and has DECL_SECTION_NAME already set (e.g.
> > because of emitting associated thunks), its virtual clones which are not
> > DECL_ONE_ONLY definitely must not reuse its section, because that results in
> > section conflicts.  For non-comdat functions e.g. put by user into some
> > special section I think we can just reuse that section.
> > 
> > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux.  Ok for
> > trunk?
> > 
> > 2010-06-29  Jakub Jelinek  <jakub@redhat.com>
> > 
> > 	PR tree-optimization/43801
> > 	* cgraph.c (cgraph_create_virtual_clone): Clear DECL_SECTION_NAME
> > 	if old_decl was DECL_ONE_ONLY.
> 
> Don't we want to do this in make_decl_local?

make_decl_local doesn't work on a copy, so if DECL_SECTION_NAME has been
assigned for it, I'd say it is too late to try to make it !DECL_ONE_ONLY
(e.g. associated thunks had to be emitted).
But perhaps it won't hurt to do that anyway.

	Jakub

  reply	other threads:[~2010-06-30  5:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-29 19:25 Jakub Jelinek
2010-06-29 20:03 ` Diego Novillo
2010-06-30  6:23 ` Jan Hubicka
2010-06-30  8:52   ` Jakub Jelinek [this message]
2010-06-30 11:59     ` Jan Hubicka

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=20100630054936.GR25077@tyan-ft48-01.lab.bos.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=jh@suse.cz \
    --cc=rguenther@suse.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).