public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] Change vec<,,vl_embed>::m_vecdata refrences into address ()
Date: Fri, 24 Feb 2023 15:06:27 +0100	[thread overview]
Message-ID: <Y/jEY5V2glzMuA6u@tucnak> (raw)
In-Reply-To: <20230224134622.09FCF13246@imap2.suse-dmz.suse.de>

On Fri, Feb 24, 2023 at 02:46:21PM +0100, Richard Biener wrote:
> As preparation to remove m_vecdata in the vl_embed vector this
> changes references to it into calls to address ().
> 
> As I was here it also fixes ::contains to avoid repeated bounds
> checking and the same issue in ::lower_bound which also suffers
> from unnecessary copying around values.
> 
> 	* vec.h: Change m_vecdata references to address ().
> 	* vec.h (vec<T, A, vl_embed>::lower_bound): Adjust to
> 	take a const reference to the object, use address to
> 	access data.
> 	(vec<T, A, vl_embed>::contains): Use address to access data.
> 	(vec<T, A, vl_embed>::operator[]): Use address instead of
> 	m_vecdata to access data.
> 	(vec<T, A, vl_embed>::iterate): Likewise.
> 	(vec<T, A, vl_embed>::copy): Likewise.
> 	(vec<T, A, vl_embed>::quick_push): Likewise.
> 	(vec<T, A, vl_embed>::pop): Likewise.
> 	(vec<T, A, vl_embed>::quick_insert): Likewise.
> 	(vec<T, A, vl_embed>::ordered_remove): Likewise.
> 	(vec<T, A, vl_embed>::unordered_remove): Likewise.
> 	(vec<T, A, vl_embed>::block_remove): Likewise.
> 	(vec<T, A, vl_heap>::address): Likewise.

Ok, thanks.

	Jakub


  reply	other threads:[~2023-02-24 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 13:46 Richard Biener
2023-02-24 14:06 ` Jakub Jelinek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-24 11:32 Richard Biener
2023-02-24 11:46 ` [PATCH 1/2] Change vec<, , vl_embed>::m_vecdata " Jakub Jelinek
2023-02-24 12:25   ` 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=Y/jEY5V2glzMuA6u@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).