public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: law@redhat.com, Aldy Hernandez <aldyh@redhat.com>,
	Martin Jambor <mjambor@suse.cz>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange))
Date: Mon, 24 Aug 2020 18:03:56 -0400	[thread overview]
Message-ID: <6ce22c21-61a0-f7f2-2776-3a88c1303196@redhat.com> (raw)
In-Reply-To: <fd804c2b23865d70b399adcd711054e0d704e05e.camel@redhat.com>

On 8/24/20 5:53 PM, Jeff Law wrote:
> On Wed, 2020-08-05 at 17:41 +0200, Aldy Hernandez wrote:
>> On 8/5/20 5:09 PM, Martin Jambor wrote:
>>
>>> On Fri, Jul 31 2020, Aldy Hernandez via Gcc-patches wrote:
>>>
>>> [...]
>>>
>>>> * ipa-cp changes from vec<value_range> to std::vec<value_range>.
>>>>
>>>> We are using std::vec to ensure constructors are run, which they aren't
>>>> in our internal vec<> implementation.  Although we usually steer away
>>>> from using std::vec because of interactions with our GC system,
>>>> ipcp_param_lattices is only live within the pass and allocated with calloc.
>>>>
>>> Ummm... I did not object but I will save the URL of this message in the
>>> archive so that I can waive it in front of anyone complaining why I
>>> don't use our internal vec's in IPA data structures.
>>>
>>> But it actually raises a broader question: was this supposed to be an
>>> exception, allowed only not to complicate the irange patch further, or
>>> will this be generally accepted thing to do when someone wants to have a
>>> vector of constructed items?
>> I don't want to start a precedent without further discussion, so let's
>> assume this was an exception.
> I'd characterize it as an exception too.  When I looked at the patch for Aldy, I
> called out this code as well and asked him to justify it and convince me it was
> safe, which he did.  I'd to the same for anything else adding use of a standard
> C++ container to hold a GC-able object.
>
> I'd certainly like to get to a place where we could be using more standard C++
> library components.  But it'll take time to get there and consensus within the
> project.
>
> jeff
I think there were adjustments made to gcc's vec, and the usage of 
std::vector is no longer present..

I also think it was not a long term perfect solution, but adequate for 
our needs at the moment.

Personally, I have no issue with std::vector when approriate.. too bad 
we can make it adequate for all our usage  :-P  That is a much bigger 
issue I am afraid.

Andrew



  reply	other threads:[~2020-08-24 22:04 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 21:44 [patch] multi-range implementation for value_range (irange) Aldy Hernandez
2020-08-05 14:27 ` Gerald Pfeifer
2020-08-05 15:45   ` Aldy Hernandez
2020-08-05 22:43     ` Gerald Pfeifer
2020-08-06  4:00       ` Richard Sandiford
2020-08-10  3:42   ` Martin Liška
2020-08-10  7:44     ` Aldy Hernandez
2020-08-10 10:22       ` Gerald Pfeifer
2020-08-10 10:30         ` Martin Liška
2020-08-10 11:03         ` Aldy Hernandez
2020-08-05 15:09 ` std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange)) Martin Jambor
2020-08-05 15:41   ` Aldy Hernandez
2020-08-05 16:55     ` Richard Biener
2020-08-24 21:53     ` Jeff Law
2020-08-24 22:03       ` Andrew MacLeod [this message]
2020-08-05 16:54   ` Richard Biener
2020-08-06  1:07     ` Andrew MacLeod
2020-08-06  5:16       ` std:vec for classes with constructor? Richard Sandiford
2020-08-06 10:19         ` Jonathan Wakely
2020-08-06 10:31           ` Richard Biener
2020-08-06 10:48             ` Jonathan Wakely
2020-08-06 14:17               ` Aldy Hernandez
2020-08-06 14:35                 ` Richard Biener
2020-08-06 14:59                   ` Aldy Hernandez
2020-08-06 16:30                 ` Jonathan Wakely
2020-08-06 17:58                   ` Aldy Hernandez
2020-08-06 19:24                     ` Jonathan Wakely
2020-08-07  6:48                       ` Richard Biener
2020-08-07  7:57                         ` Jonathan Wakely
2020-08-07  8:22                           ` Richard Biener
2020-08-07  8:34                             ` Jonathan Wakely
2020-08-07  8:54                               ` Richard Biener
2020-08-07  8:55                               ` Jakub Jelinek
2020-08-07  9:17                                 ` Jonathan Wakely
2020-08-07 18:04                                   ` Aldy Hernandez
2020-08-07 18:33                                     ` Jakub Jelinek
2020-08-10 12:57                                       ` Aldy Hernandez
2020-08-10 13:05                                         ` Aldy Hernandez
2020-08-10 18:03                                           ` Jakub Jelinek
2020-08-10 13:51                                         ` Jakub Jelinek
2020-08-10 16:58                                           ` Richard Biener
2020-08-10 17:18                                             ` Jakub Jelinek
2020-08-13 11:38                                     ` r11-2663 causes static_assert failure (was: Re: std:vec for classes with constructor?) Tobias Burnus
2020-08-13 11:52                                       ` Jakub Jelinek
2020-08-13 12:06                                         ` r11-2663 causes static_assert failure Tobias Burnus
2020-08-13 12:25                                           ` Jakub Jelinek
2020-08-13 12:40                                             ` Jakub Jelinek
2020-08-13 12:46                                             ` Iain Sandoe
2020-08-13 12:55                                               ` Iain Sandoe
2020-08-13 13:04                                                 ` Jakub Jelinek
2020-08-13 13:00                                               ` Jakub Jelinek
2020-08-06  6:57       ` std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange)) Richard Biener
2020-08-06 10:23         ` Jonathan Wakely
2020-08-06 11:03         ` Aldy Hernandez

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=6ce22c21-61a0-f7f2-2776-3a88c1303196@redhat.com \
    --to=amacleod@redhat.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --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).