public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Xinliang David Li <davidxl@google.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Martin Jambor <mjambor@suse.cz>
Subject: Re: SRA generates uninitialized var use
Date: Mon, 20 Jun 2011 20:58:00 -0000	[thread overview]
Message-ID: <BANLkTimQ1hjB=TnmZ3RMVOCWxOxM6ARK2w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinrAFzWvYL2ZT9ADV8vekAx9z8urrieJgWdQGVAfyZrcA@mail.gmail.com>

On Mon, Jun 20, 2011 at 6:15 PM, Xinliang David Li <davidxl@google.com> wrote:
> It is used to indicate the fact the var decl needs to have a memory
> home (addressable) -- is there another way to do this? this is to
> avoid the following situation:
>
> 1) after SRA before update SSA, the IR looks like:
>
>   MEM[.... &SR_123] = ...
>
>   other_var = SR_123;   <---- (x)
>
>
> In this case, SR_123 is not of aggregate type, and it is not
> addressable, update_ssa won't assign a VUSE for (x), leading to

The point is, SRA should never have created the above

  MEM[.... &SR_123] = ...

Martin, why would it even create new _memory_ backed decls?

Richard.

> 2) final IR after SRA:
>
>   MEM[..., &SR_123] = ..
>   other_var = SR_123_yyy(D);
>
>
> David
>
> On Mon, Jun 20, 2011 at 4:13 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Sat, Jun 18, 2011 at 10:56 AM, Xinliang David Li <davidxl@google.com> wrote:
>>> Compiling the test case in the patch with -O2 -m32 without the fix,
>>> the program will abort. The problem is a var decl whose address is
>>> taken is not marked as addressable leading to bad SSA update (missing
>>> VUSE).  (the triaging used the the .after and .after_cleanup dump diff
>>> and found the problem).
>>>
>>> the test is on going. Ok after testing?
>>
>> That doesn't make sense.  SRA shouldn't generate anything that has
>> its address taken.  So, where do we take its address?
>>
>> Richard.
>>
>>> Thanks,
>>>
>>> David
>>>
>>
>

  reply	other threads:[~2011-06-20 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-18 10:20 Xinliang David Li
2011-06-19 12:45 ` Xinliang David Li
2011-06-20 11:15 ` Richard Guenther
2011-06-20 16:23   ` Xinliang David Li
2011-06-20 20:58     ` Richard Guenther [this message]
2011-06-20 23:40       ` Xinliang David Li
2011-06-21  8:56         ` Richard Guenther
2011-06-21 16:11           ` Xinliang David Li
2011-06-21 16:11             ` Richard Guenther
2011-06-22 14:00               ` Martin Jambor
2011-06-23 14:37       ` 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='BANLkTimQ1hjB=TnmZ3RMVOCWxOxM6ARK2w@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=davidxl@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mjambor@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).