public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@linux.ibm.com>
To: Qing Zhao <qing.zhao@oracle.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]
Date: Tue, 30 Nov 2021 14:07:08 -0600	[thread overview]
Message-ID: <e03ef8d0-6c4b-b8b3-234f-869ed1b6703e@linux.ibm.com> (raw)
In-Reply-To: <EACA252A-7D3A-4B28-B9A4-D9AD970A1EE4@oracle.com>

On 11/30/21 1:50 PM, Qing Zhao via Gcc-patches wrote:
>> void
>> bar (__vector_pair *dst, __vector_pair *src)
>> {
>>  __vector_pair pair;
>>  pair = *src;
>>  ...
>> }
> 
> However, even with the above, the memory pointed by “src” still need to
> be initialized somewhere. How to provide the initial value to the variable
> in the beginning for __vector_pair type?

Well no initialization is required here in this function.  Isn't that what
matters here?  When generating code for bar(), we assume that src already
points to initialized memory.

As for what src points to, that could be initialized how any other memory/
array could be initialized, so either a static array, read in some data
from a file into an array, compute the array values in a loop, etc. etc.

Peter


  reply	other threads:[~2021-11-30 20:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 21:56 Peter Bergner
2021-11-29 22:56 ` Qing Zhao
2021-11-30  8:37   ` Richard Biener
2021-11-30 15:14     ` Peter Bergner
2021-11-30 17:51       ` Qing Zhao
2021-11-30 18:08         ` Peter Bergner
2021-11-30 19:50           ` Qing Zhao
2021-11-30 20:07             ` Peter Bergner [this message]
2021-11-30 20:44               ` Qing Zhao
2021-11-30 22:35                 ` Peter Bergner
2021-12-01  9:01                   ` Richard Biener
2021-12-01 15:06                     ` Qing Zhao
2021-12-01 16:08                       ` Peter Bergner
2021-12-01 17:42                     ` Peter Bergner
2021-12-01 19:07                       ` Richard Biener
2021-12-01 19:29                         ` Peter Bergner
2021-11-30 17:59     ` Qing Zhao

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=e03ef8d0-6c4b-b8b3-234f-869ed1b6703e@linux.ibm.com \
    --to=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=qing.zhao@oracle.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).