public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: Erick Ochoa <eochoa@gcc.gnu.org>, gcc@gcc.gnu.org
Subject: Re: Question on cgraph_edge::call_stmt during LTO
Date: Sat, 21 May 2022 00:13:16 +0200	[thread overview]
Message-ID: <ri6leuvc0oz.fsf@suse.cz> (raw)
In-Reply-To: <CAJ_nqzgJZS53zJvGTOH2t68HQy78MvTYOSnBvXjdy_sqR=bHEA@mail.gmail.com>

Hello,

On Fri, May 20 2022, Erick Ochoa via Gcc wrote:
> Hi,
>
> I'm working on a pass that looks into the estimated values during ipa-cp
> and stores them for a later analyses/pass. I would like to store the real
> arguments' estimates in a cgraph_edge::call_stmt or somewhere else that
> makes similar sense. (Note, this is different from the formal parameters'
> estimates which can be found in the lattice print out of ipa-cp).

the statement is not the right place to store such pass-specific
information, for reasons you described and more (especially simple
memory use efficiency).

Instead they should be placed into an "edge summary" (also sometimes
called "call summary"), a structure similar to ipa_edge_args_sum (in
ipa-prop.h and ipa-prop.cc).  Unlike ipa_edge_args_sum, which is
allocated at analysis phase, then streamed out and in in case of LTO,
and used thrown away during the IPA analysis phase, your summary would
need to be allocated at IPA analysis time, then streamed out in
ipcp_write_transformation_summaries, streamed in in
ipcp_read_transformation_summaries so that they can be used in the
transformation phase.

Usually a simple implementation of the duplication hook of an edge
summary is enough for the data to survive cloning and inlining and the
like.

Martin

  reply	other threads:[~2022-05-20 22:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 12:43 Erick Ochoa
2022-05-20 22:13 ` Martin Jambor [this message]
2022-06-02  7:45   ` Erick Ochoa
2022-06-14 16:41     ` Martin Jambor

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=ri6leuvc0oz.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=eochoa@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    /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).