Re: Some questions on hash_set/hash_map traits

2021-09-09 Thread Richard Biener via Gcc
removed". > > * Is "removed" supposed to, for example, call the destructor? Since, > in this particular case, it is only a wrapper and cgraph_node is not > intended to be destroyed, I just assign the pointer to NULL. Not sure > if that's the intention. > * I

Some questions on hash_set/hash_map traits

2021-09-08 Thread Erick Ochoa via Gcc
e case? * I see that there is a typed_delete_remove function that is sometimes used in traits, but I think that it doesn't apply to this case because I am storing the whole object. Is that the case? I later did some refactoring (patch 3), which did not seem to impact the code now, but will i

Fix 'hash_table::expand' to destruct stale Value objects (was: 'hash_map>')

2021-08-30 Thread Thomas Schwinge
M, Thomas Schwinge wrote: >>>> So I'm trying to do some C++... ;-) >>>> >>>> Given: >>>> >>>> /* A map from SSA names or var decls to record fields. */ >>>> typedef hash_map field_map_t; >>>> >&

Re: Expensive selftests (was: 'hash_map>')

2021-08-18 Thread David Edelsohn via Gcc
On 8/16/21 6:44 AM, Thomas Schwinge wrote: > > >> [...], to document the current behavior, I propose to > > >> "Add more self-tests for 'hash_map' with Value type with non-trivial > > >> constructor/destructor", see attached. OK to push to m

Add more self-tests for 'hash_map' with Value type with non-trivial constructor/destructor (was: Expensive selftests)

2021-08-18 Thread Thomas Schwinge
ior, I propose to >> >> "Add more self-tests for 'hash_map' with Value type with non-trivial >> >> constructor/destructor", see attached. OK to push to master branch? >> >> (Also cherry-pick into release branches, eventually?) >> >

Re: Expensive selftests (was: 'hash_map>')

2021-08-17 Thread Richard Biener via Gcc
On Tue, Aug 17, 2021 at 8:40 AM Thomas Schwinge wrote: > > Hi! > > On 2021-08-16T14:10:00-0600, Martin Sebor wrote: > > On 8/16/21 6:44 AM, Thomas Schwinge wrote: > >> [...], to document the current behavior, I propose to > >> "Add more self-tests for &#

Expensive selftests (was: 'hash_map>')

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-08-16T14:10:00-0600, Martin Sebor wrote: > On 8/16/21 6:44 AM, Thomas Schwinge wrote: >> [...], to document the current behavior, I propose to >> "Add more self-tests for 'hash_map' with Value type with non-trivial >> constructor/destructor&q

Re: 'hash_map>'

2021-08-16 Thread Martin Sebor via Gcc
On 8/16/21 6:44 AM, Thomas Schwinge wrote: Hi! On 2021-08-12T17:15:44-0600, Martin Sebor via Gcc wrote: On 8/6/21 10:57 AM, Thomas Schwinge wrote: So I'm trying to do some C++... ;-) Given: /* A map from SSA names or var decls to record fields. */ typedef hash_map field_

Re: 'hash_map>'

2021-08-16 Thread Richard Biener via Gcc
> Given: > >> > >> /* A map from SSA names or var decls to record fields. */ > >> typedef hash_map field_map_t; > >> > >> /* For each propagation record type, this is a map from SSA names or > >> var decls > >>

Re: 'hash_map>'

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-08-12T17:15:44-0600, Martin Sebor via Gcc wrote: > On 8/6/21 10:57 AM, Thomas Schwinge wrote: >> So I'm trying to do some C++... ;-) >> >> Given: >> >> /* A map from SSA names or var decls to record fields. */ >> typedef

Re: 'hash_map>'

2021-08-16 Thread Thomas Schwinge
Hi! On 2021-08-09T12:02:02+0200, Richard Biener via Gcc wrote: > On Fri, Aug 6, 2021 at 6:58 PM Thomas Schwinge > wrote: >> So I'm trying to do some C++... ;-) >> >> Given: >> >> /* A map from SSA names or var decls to record fields

Re: 'hash_map>'

2021-08-16 Thread Thomas Schwinge
some C++... ;-) >> >> >> >> Given: >> >> >> >> /* A map from SSA names or var decls to record fields. */ >> >> typedef hash_map field_map_t; >> >> >> >> /* For each propagation record type, this is

Re: 'hash_map>'

2021-08-12 Thread Martin Sebor via Gcc
On 8/6/21 10:57 AM, Thomas Schwinge wrote: Hi! So I'm trying to do some C++... ;-) Given: /* A map from SSA names or var decls to record fields. */ typedef hash_map field_map_t; /* For each propagation record type, this is a map from SSA names or var decls

Re: 'hash_map>'

2021-08-09 Thread Richard Biener via Gcc
On Fri, Aug 6, 2021 at 6:58 PM Thomas Schwinge wrote: > > Hi! > > So I'm trying to do some C++... ;-) > > Given: > > /* A map from SSA names or var decls to record fields. */ > typedef hash_map field_map_t; > > /* For each propagation record typ

Re: 'hash_map>'

2021-08-07 Thread Jonathan Wakely via Gcc
t;> > >> /* A map from SSA names or var decls to record fields. */ > >> typedef hash_map field_map_t; > >> > >> /* For each propagation record type, this is a map from SSA names or > >> var decls > >>to propagate, to th

Re: 'hash_map>'

2021-08-07 Thread Thomas Schwinge
Hi! On 2021-08-06T19:37:58+0100, Jonathan Wakely wrote: > On Fri, 6 Aug 2021, 17:58 Thomas Schwinge, wrote: >> So I'm trying to do some C++... ;-) >> >> Given: >> >> /* A map from SSA names or var decls to record fields. */ >> typedef

Re: 'hash_map>'

2021-08-06 Thread Jonathan Wakely via Gcc
On Fri, 6 Aug 2021, 17:58 Thomas Schwinge, wrote: > Hi! > > So I'm trying to do some C++... ;-) > > Given: > > /* A map from SSA names or var decls to record fields. */ > typedef hash_map field_map_t; > > /* For each propagation record type, th

'hash_map>'

2021-08-06 Thread Thomas Schwinge
Hi! So I'm trying to do some C++... ;-) Given: /* A map from SSA names or var decls to record fields. */ typedef hash_map field_map_t; /* For each propagation record type, this is a map from SSA names or var decls to propagate, to the field in the record type that s

Re: help debug hash_map garbage collection issue

2021-04-21 Thread Martin Sebor via Gcc
:03:00PM -0600, Martin Sebor via Gcc wrote: I have a static hash_map object that needs to persist across passes: static GTY(()) hash_map *map; I initialize the map like so: map = hash_map::create_ggc (4); But I see crashes when accessing the map after adding and removing some number of

Re: help debug hash_map garbage collection issue

2021-04-20 Thread Jason Merrill via Gcc
On Tue, Apr 20, 2021 at 02:03:00PM -0600, Martin Sebor via Gcc wrote: > >>>>> I have a static hash_map object that needs to persist across passes: > >>>>> > >>>>> static GTY(()) hash_map *map; > >>>>> > >>>>>

Re: help debug hash_map garbage collection issue

2021-04-20 Thread Martin Sebor via Gcc
On 4/20/21 5:03 PM, Martin Sebor wrote: On 4/20/21 4:15 PM, Martin Sebor wrote: On 4/20/21 2:36 PM, Martin Sebor wrote: On 4/20/21 2:13 PM, Marek Polacek wrote: On Tue, Apr 20, 2021 at 02:03:00PM -0600, Martin Sebor via Gcc wrote: I have a static hash_map object that needs to persist across

Re: help debug hash_map garbage collection issue

2021-04-20 Thread Martin Sebor via Gcc
On 4/20/21 4:15 PM, Martin Sebor wrote: On 4/20/21 2:36 PM, Martin Sebor wrote: On 4/20/21 2:13 PM, Marek Polacek wrote: On Tue, Apr 20, 2021 at 02:03:00PM -0600, Martin Sebor via Gcc wrote: I have a static hash_map object that needs to persist across passes:    static GTY(()) hash_map *map

Re: help debug hash_map garbage collection issue

2021-04-20 Thread Martin Sebor via Gcc
On 4/20/21 2:36 PM, Martin Sebor wrote: On 4/20/21 2:13 PM, Marek Polacek wrote: On Tue, Apr 20, 2021 at 02:03:00PM -0600, Martin Sebor via Gcc wrote: I have a static hash_map object that needs to persist across passes:    static GTY(()) hash_map *map; I initialize the map like so:    map

Re: help debug hash_map garbage collection issue

2021-04-20 Thread Martin Sebor via Gcc
On 4/20/21 2:13 PM, Marek Polacek wrote: On Tue, Apr 20, 2021 at 02:03:00PM -0600, Martin Sebor via Gcc wrote: I have a static hash_map object that needs to persist across passes: static GTY(()) hash_map *map; I initialize the map like so: map = hash_map::create_ggc (4); But I see

Re: help debug hash_map garbage collection issue

2021-04-20 Thread Marek Polacek via Gcc
On Tue, Apr 20, 2021 at 02:03:00PM -0600, Martin Sebor via Gcc wrote: > I have a static hash_map object that needs to persist across passes: > > static GTY(()) hash_map *map; > > I initialize the map like so: > > map = hash_map::create_ggc (4); > > But I see cra

help debug hash_map garbage collection issue

2021-04-20 Thread Martin Sebor via Gcc
I have a static hash_map object that needs to persist across passes: static GTY(()) hash_map *map; I initialize the map like so: map = hash_map::create_ggc (4); But I see crashes when accessing the map after adding and removing some number of entries in a few passes. The crashes are due

Re: hash_map for OpenVMS?

2008-02-18 Thread Paolo Carlini
Info IT-BCSB wrote: > Hello, > > i have a problem and hope you could help me to transport the special > funktion "hash_map" to the OpenVMS system for a special software. This > special software was develop on a linux system with the g++ compiler. Now, i > would like t

hash_map for OpenVMS?

2008-02-18 Thread Info IT-BCSB
Hello, i have a problem and hope you could help me to transport the special funktion "hash_map" to the OpenVMS system for a special software. This special software was develop on a linux system with the g++ compiler. Now, i would like to move this special software to OpenVMS. But OpenV