From: Jeff Law <law@redhat.com>
To: Ilya Enkovich <enkovich.gnu@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, Pointer Bounds Checker 13/x] Early versioning
Date: Fri, 30 May 2014 16:59:00 -0000 [thread overview]
Message-ID: <5388B8F2.3050509@redhat.com> (raw)
In-Reply-To: <20140529110526.GB30323@msticlxl57.ims.intel.com>
On 05/29/14 05:05, Ilya Enkovich wrote:
> Hi,
>
> This patch allows to perform function versioning when some structures are not available yet. It is required to make clones for Pointer Bounds Checker right after SSA build.
>
> Bootstrapped and tested on linux-x86_64.
>
> Thanks,
> Ilya
> --
> gcc/
>
> 2014-05-29 Ilya Enkovich <ilya.enkovich@intel.com>
>
> * tree-inline.c (copy_cfg_body): Check loop tree
> existence before accessing it.
> (tree_function_versioning): Check DF info existence
> before accessing it.
>
> diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
> index 4293241..23fef90 100644
> --- a/gcc/tree-inline.c
> +++ b/gcc/tree-inline.c
> @@ -2544,7 +2544,8 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency_scale,
>
> /* If the loop tree in the source function needed fixup, mark the
> destination loop tree for fixup, too. */
> - if (loops_for_fn (src_cfun)->state & LOOPS_NEED_FIXUP)
> + if (loops_for_fn (src_cfun)
> + && loops_for_fn (src_cfun)->state & LOOPS_NEED_FIXUP)
> loops_state_set (LOOPS_NEED_FIXUP);
Hmm, so if I understand things correctly, src_fun has no loop structures
attached, thus there's nothing to copy. Presumably at some later point
we build loop structures for the copy from scratch?
Similarly for the PTA info, we just build it from scratch in the copy at
some point?
Assuming the answers to both are yes, then this patch is OK for the
trunk when the rest of the patches are approved. It's not great, bit
it's OK.
jeff
next prev parent reply other threads:[~2014-05-30 16:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 11:05 Ilya Enkovich
2014-05-30 16:59 ` Jeff Law [this message]
2014-06-02 10:48 ` Ilya Enkovich
2014-06-02 11:56 ` Richard Biener
2014-06-02 12:02 ` Ilya Enkovich
2014-06-02 17:27 ` Jeff Law
2014-06-03 5:55 ` Ilya Enkovich
2014-06-03 9:29 ` Richard Biener
2014-06-04 6:46 ` Jeff Law
2014-06-04 8:04 ` Ilya Enkovich
2014-06-04 10:00 ` Richard Biener
2014-06-05 11:18 ` Ilya Enkovich
2014-06-05 11:58 ` Richard Biener
2014-06-05 13:00 ` Ilya Enkovich
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=5388B8F2.3050509@redhat.com \
--to=law@redhat.com \
--cc=enkovich.gnu@gmail.com \
--cc=gcc-patches@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).