On 12/5/19 5:25 PM, Martin Sebor wrote:
On 12/5/19 8:13 AM, Martin Liška wrote:
On 12/5/19 2:03 PM, Jan Hubicka wrote:
Hi.
As mentioned in the PR, there are classes in cgraph.h that are
not PODs and are initialized with ggc_alloc_cleared. So that I'm suggesting
to use proper constructors. I ad
On 12/7/19 12:49 AM, Bernhard Reutner-Fischer wrote:
On 5 December 2019 16:24:53 CET, "Martin Liška" wrote:
-/* Allocate new callgraph node. */
-
-inline cgraph_node *
-symbol_table::allocate_cgraph_symbol (void)
-{
- cgraph_node *node;
-
- node = ggc_cleared_alloc ();
- node->type = SYMTAB
On 5 December 2019 16:24:53 CET, "Martin Liška" wrote:
-/* Allocate new callgraph node. */
-
-inline cgraph_node *
-symbol_table::allocate_cgraph_symbol (void)
-{
- cgraph_node *node;
-
- node = ggc_cleared_alloc ();
- node->type = SYMTAB_FUNCTION;
- node->m_summary_id = -1;
- node->m_uid =
Hi,
On Thu, 5 Dec 2019, Richard Biener wrote:
> >> Indeed - please adjust that as well.
> >
> >Explicit ctors are a c++11+ feature.
>
> Surely not.
Whoops, I was conflating ctors and conversion functions, the latter can
be explicit only in c++11+.
Ciao,
Michael.
On December 5, 2019 5:31:59 PM GMT+01:00, Michael Matz wrote:
>Hi,
>
>On Thu, 5 Dec 2019, Richard Biener wrote:
>
>> On December 5, 2019 3:35:17 PM GMT+01:00, Tom Tromey
>wrote:
>> >> "Martin" == Martin Liška writes:
>> >
>> >Martin> + /* Default constructor. */
>> >Martin> + symtab_node
Hi,
On Thu, 5 Dec 2019, Richard Biener wrote:
> On December 5, 2019 3:35:17 PM GMT+01:00, Tom Tromey wrote:
> >> "Martin" == Martin Liška writes:
> >
> >Martin> + /* Default constructor. */
> >Martin> + symtab_node (symtab_type t)
> >
> >FWIW, in gdb, we normally make single-argument con
On 12/5/19 8:13 AM, Martin Liška wrote:
On 12/5/19 2:03 PM, Jan Hubicka wrote:
Hi.
As mentioned in the PR, there are classes in cgraph.h that are
not PODs and are initialized with ggc_alloc_cleared. So that I'm
suggesting
to use proper constructors. I added ggc_new function that can be used
a
On 12/5/19 4:17 PM, Martin Liška wrote:
On 12/5/19 4:12 PM, Richard Biener wrote:
Isn't there std::default_constructible? Also after your patch it's far from
obvious which api to use.
Will it work with:
struct Foo
{
Foo(int) {}
};
...
if (std::default_constructible ())
ptr = new ptr
On 12/5/19 4:12 PM, Richard Biener wrote:
Isn't there std::default_constructible? Also after your patch it's far from
obvious which api to use.
Will it work with:
struct Foo
{
Foo(int) {}
};
...
if (std::default_constructible ())
ptr = new ptr T ();
?
Wouldn't we end up with a compila
On December 5, 2019 3:35:17 PM GMT+01:00, Tom Tromey wrote:
>> "Martin" == Martin Liška writes:
>
>Martin> + /* Default constructor. */
>Martin> + symtab_node (symtab_type t)
>
>FWIW, in gdb, we normally make single-argument constructors "explicit".
>This helps avoid surprises with implici
On 12/5/19 2:03 PM, Jan Hubicka wrote:
Hi.
As mentioned in the PR, there are classes in cgraph.h that are
not PODs and are initialized with ggc_alloc_cleared. So that I'm suggesting
to use proper constructors. I added ggc_new function that can be used
at different locations as well.
I'm attachi
On December 5, 2019 3:09:40 PM GMT+01:00, "Martin Liška" wrote:
>On 12/5/19 2:53 PM, Richard Biener wrote:
>> On December 5, 2019 2:03:58 PM GMT+01:00, "Martin Liška"
> wrote:
>>> On 12/5/19 1:59 PM, Richard Biener wrote:
Isn't there ggc_alloc for this? Also ggc_alloc_no_dtor in
>>> case yo
> "Martin" == Martin Liška writes:
Martin> + /* Default constructor. */
Martin> + symtab_node (symtab_type t)
FWIW, in gdb, we normally make single-argument constructors "explicit".
This helps avoid surprises with implicit conversions.
Tom
On 12/5/19 2:53 PM, Richard Biener wrote:
On December 5, 2019 2:03:58 PM GMT+01:00, "Martin Liška" wrote:
On 12/5/19 1:59 PM, Richard Biener wrote:
Isn't there ggc_alloc for this? Also ggc_alloc_no_dtor in
case you
want to handle finalization yourself.
No, if I see correctly it only call
> On December 5, 2019 2:03:58 PM GMT+01:00, "Martin Liška"
> wrote:
> >On 12/5/19 1:59 PM, Richard Biener wrote:
> >> Isn't there ggc_alloc for this? Also ggc_alloc_no_dtor in
> >case you
> >> want to handle finalization yourself.
> >
> >No, if I see correctly it only calls Dtor:
>
> But its o
On December 5, 2019 2:03:58 PM GMT+01:00, "Martin Liška" wrote:
>On 12/5/19 1:59 PM, Richard Biener wrote:
>> Isn't there ggc_alloc for this? Also ggc_alloc_no_dtor in
>case you
>> want to handle finalization yourself.
>
>No, if I see correctly it only calls Dtor:
But its odd to handle finaliza
On 12/5/19 1:59 PM, Richard Biener wrote:
Isn't there ggc_alloc for this? Also ggc_alloc_no_dtor in case you
want to handle finalization yourself.
No, if I see correctly it only calls Dtor:
template
inline T *
ggc_alloc (ALONE_CXX_MEM_STAT_INFO)
{
if (need_finalization_p ())
return sta
> Hi.
>
> As mentioned in the PR, there are classes in cgraph.h that are
> not PODs and are initialized with ggc_alloc_cleared. So that I'm suggesting
> to use proper constructors. I added ggc_new function that can be used
> at different locations as well.
>
> I'm attaching optimized dump file wi
On Thu, Dec 5, 2019 at 1:50 PM Martin Liška wrote:
>
> Hi.
>
> As mentioned in the PR, there are classes in cgraph.h that are
> not PODs and are initialized with ggc_alloc_cleared. So that I'm suggesting
> to use proper constructors. I added ggc_new function that can be used
> at different locatio
19 matches
Mail list logo