public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xinliang David Li <davidxl@google.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: SRA generates uninitialized var use
Date: Mon, 20 Jun 2011 16:23:00 -0000	[thread overview]
Message-ID: <BANLkTinrAFzWvYL2ZT9ADV8vekAx9z8urrieJgWdQGVAfyZrcA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimCa+iAU5JOXCk1b2Z9CK+54SmUaA@mail.gmail.com>

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

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 16:16 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 [this message]
2011-06-20 20:58     ` Richard Guenther
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=BANLkTinrAFzWvYL2ZT9ADV8vekAx9z8urrieJgWdQGVAfyZrcA@mail.gmail.com \
    --to=davidxl@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.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).