public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Bin.Cheng" <amker.cheng@gmail.com>
Cc: Jeff Law <law@redhat.com>, Bin Cheng <bin.cheng@arm.com>,
		gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH GCC][refacor]Manage allocation of struct iv in obstack.
Date: Tue, 30 Jun 2015 07:53:00 -0000	[thread overview]
Message-ID: <CAFiYyc0FjWXOredodnBQWtOLTO2ziu8uVo-fWRuUshfxuzR7Ag@mail.gmail.com> (raw)
In-Reply-To: <CAHFci2__Vnb-3GkgMLYfvW4TdJhoEZ-9sXZJLQOhYixEOOn4dA@mail.gmail.com>

On Tue, Jun 30, 2015 at 4:31 AM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Sat, Jun 27, 2015 at 5:13 AM, Jeff Law <law@redhat.com> wrote:
>> On 06/26/2015 03:02 AM, Bin Cheng wrote:
>>>
>>> Hi,
>>> GCC avoids multi-pointers/dangling-pointers of struct iv by allocating
>>> multiple copies of the structure.  This patch is an obvious fix to the
>>> issue
>>> by managing iv structures in obstack.
>>>
>>> Bootstrap on x86_64, will apply to trunk if no objection.
>>>
>>> Thanks,
>>> bin
>>>
>>> 2015-06-26  Bin Cheng  <bin.cheng@arm.com>
>>>
>>>         * tree-ssa-loop-ivopts.c (struct ivopts_data): New field
>>> iv_obstack.
>>>         (tree_ssa_iv_optimize_init): Initialize iv_obstack.
>>>         (alloc_iv): New parameter.  Allocate struct iv using
>>> obstack_alloc.
>>>         (set_iv, find_interesting_uses_address, add_candidate_1): New
>>>         argument.
>>>         (find_interesting_uses_op): Don't duplicate struct iv.
>>>         (free_loop_data): Don't free iv structure explicitly.
>>>         (tree_ssa_iv_optimize_finalize): Free iv_obstack.
>>
>> Presumably you're trying to simplify the memory management  here so that you
>> don't have to track lifetimes of the IV structures so carefully, which in
>> turn simplifies some upcoming patch?
> Yes, that's exactly the reason.  I am still on the way fixing
> missed-optimizations in IVO, and plan to do some
> refactoring/simplification afterwards.
>>
>> Note we don't have a "no objection" policy for this kind of patch. However,
>> I think it may make sense to look into having you as a maintainer for the IV
>> optimizations if you're interested.
> Oh, that would be my great honor.

I'd support that.  Bin has done high quality work on IVOPTs in the past and he
knows when to ask questions (not that there ever were simple answers
to those...).

Thanks,
Richard.

> Thanks,
> bin
>>
>> Jeff
>>

  reply	other threads:[~2015-06-30  7:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26  9:08 Bin Cheng
2015-06-26 21:28 ` Jeff Law
2015-06-30  3:08   ` Bin.Cheng
2015-06-30  7:53     ` Richard Biener [this message]
2015-07-01  7:35       ` Richard Biener

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=CAFiYyc0FjWXOredodnBQWtOLTO2ziu8uVo-fWRuUshfxuzR7Ag@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=amker.cheng@gmail.com \
    --cc=bin.cheng@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.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).