public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gary Oblock <goblock@marvell.com>
To: "Martin Liška" <mliska@suse.cz>, "GCC Development" <gcc@gcc.gnu.org>
Subject: Re: [EXT] Re: Questions about initialization data during LTO
Date: Mon, 16 Sep 2019 18:28:00 -0000	[thread overview]
Message-ID: <MWHPR18MB10724F9240A96F0996C7F281B98C0@MWHPR18MB1072.namprd18.prod.outlook.com> (raw)
In-Reply-To: <d686b7d5-0156-4e34-dfe5-a7223190c271@suse.cz>

On 9/14/19 8:39 AM, Martin Liška wrote:

On 9/13/19 3:01 PM, Gary Oblock wrote:


So, back to my questions, any ideas about how to get initialization
information? This
is going to be a very powerful optimization for code with structures of
arrays and
I just need a little help getting around a few obstacles in my path.



Sure. So I would point you to the IPA ICF pass, which makes merging
of variables in WPA phase of LTO. Let's take a look at:

ipa-icf.c:1839 (sem_variable::equals) where
we do:
   if (DECL_INITIAL (decl) == error_mark_node && in_lto_p)
     dyn_cast <varpool_node *>(node)->get_constructor ();

That's the way how load DECL_INITIAL of variables.
Does it help you?

Martin



So Martin, let me get this straight, all of the initialization information
can be fetched here? I ask this because I was under the impression that
some of it was deleted and could not be recovered. The worst case scenario
for my optimization (making it illegal) is if the user specified an initialization
and the initialization disappeared without leaving a trace in the IR that it ever
existed.

Many thanks,

Gary

  reply	other threads:[~2019-09-16 18:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 23:27 Gary Oblock
2019-09-12 10:12 ` Richard Biener
2019-09-12 19:09   ` [EXT] " Gary Oblock
2019-09-13 12:58     ` Richard Biener
2019-09-13 12:19 ` Martin Liška
2019-09-13 19:01   ` [EXT] " Gary Oblock
2019-09-14 15:39     ` Martin Liška
2019-09-16 18:28       ` Gary Oblock [this message]
2019-09-16 22:19         ` 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=MWHPR18MB10724F9240A96F0996C7F281B98C0@MWHPR18MB1072.namprd18.prod.outlook.com \
    --to=goblock@marvell.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /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).