* [ reload-v2]
@ 2010-06-16 15:51 Jeff Law
2010-06-16 16:36 ` Jan Hubicka
2010-06-17 8:20 ` Laurynas Biveinis
0 siblings, 2 replies; 6+ messages in thread
From: Jeff Law @ 2010-06-16 15:51 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
ggc_realloc is no longer supported, ggc_realloc_stat is the proper way
to do things now. This allows reload-v2 to bootstrap after monday's
merge from the trunk.
[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1502 bytes --]
Index: ChangeLog-ira-reload
===================================================================
*** ChangeLog-ira-reload (revision 160799)
--- ChangeLog-ira-reload (working copy)
***************
*** 1,3 ****
--- 1,7 ----
+ 2010-06-16 Jeff Law <law@redhat.com>
+
+ * ira-reload.c (localize_pseudos): Use ggc_realloc_stat.
+
2010-06-09 Jeff Law <law@redhat.com>
* ira-build.c (initiate_cost_vectors): Initiate a cost vector for
Index: ira-reload.c
===================================================================
*** ira-reload.c (revision 160799)
--- ira-reload.c (working copy)
*************** localize_pseudos (basic_block bb, bitmap
*** 899,905 ****
VEC_safe_grow_cleared (rtx, gc, reg_equiv_memory_loc_vec, max_regno);
reg_equiv_memory_loc = VEC_address (rtx, reg_equiv_memory_loc_vec);
reg_equiv_init
! = (rtx *) ggc_realloc (reg_equiv_init, max_regno * sizeof (rtx));
memset (®_equiv_init[orig_max_reg_num], 0, nregs * sizeof (rtx));
regstat_n_sets_and_refs
= ((struct regstat_n_sets_and_refs_t *)
--- 899,905 ----
VEC_safe_grow_cleared (rtx, gc, reg_equiv_memory_loc_vec, max_regno);
reg_equiv_memory_loc = VEC_address (rtx, reg_equiv_memory_loc_vec);
reg_equiv_init
! = (rtx *) ggc_realloc_stat (reg_equiv_init, max_regno * sizeof (rtx) PASS_MEM_STAT);
memset (®_equiv_init[orig_max_reg_num], 0, nregs * sizeof (rtx));
regstat_n_sets_and_refs
= ((struct regstat_n_sets_and_refs_t *)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ reload-v2]
2010-06-16 15:51 [ reload-v2] Jeff Law
@ 2010-06-16 16:36 ` Jan Hubicka
2010-06-16 16:38 ` Jeff Law
2010-06-17 8:20 ` Laurynas Biveinis
1 sibling, 1 reply; 6+ messages in thread
From: Jan Hubicka @ 2010-06-16 16:36 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
>
> ggc_realloc is no longer supported, ggc_realloc_stat is the proper way
> to do things now. This allows reload-v2 to bootstrap after monday's
> merge from the trunk.
Well, it was definitly not intention of my statistics code to require
users to add random PASS_MEM_STAT.
There should be always corresponding macro hidding that.
Also your patch will not compile with --enable-gather-detailed-stats
since you need MEM_STAT_INFO.
I would wote for returning ggc_realloc define, I guess it went away
only because it is currently unused (all callers of ggc_realloc are
_stat functions themselves).
Honza
>
>
> Index: ChangeLog-ira-reload
> ===================================================================
> *** ChangeLog-ira-reload (revision 160799)
> --- ChangeLog-ira-reload (working copy)
> ***************
> *** 1,3 ****
> --- 1,7 ----
> + 2010-06-16 Jeff Law <law@redhat.com>
> +
> + * ira-reload.c (localize_pseudos): Use ggc_realloc_stat.
> +
> 2010-06-09 Jeff Law <law@redhat.com>
>
> * ira-build.c (initiate_cost_vectors): Initiate a cost vector for
> Index: ira-reload.c
> ===================================================================
> *** ira-reload.c (revision 160799)
> --- ira-reload.c (working copy)
> *************** localize_pseudos (basic_block bb, bitmap
> *** 899,905 ****
> VEC_safe_grow_cleared (rtx, gc, reg_equiv_memory_loc_vec, max_regno);
> reg_equiv_memory_loc = VEC_address (rtx, reg_equiv_memory_loc_vec);
> reg_equiv_init
> ! = (rtx *) ggc_realloc (reg_equiv_init, max_regno * sizeof (rtx));
> memset (®_equiv_init[orig_max_reg_num], 0, nregs * sizeof (rtx));
> regstat_n_sets_and_refs
> = ((struct regstat_n_sets_and_refs_t *)
> --- 899,905 ----
> VEC_safe_grow_cleared (rtx, gc, reg_equiv_memory_loc_vec, max_regno);
> reg_equiv_memory_loc = VEC_address (rtx, reg_equiv_memory_loc_vec);
> reg_equiv_init
> ! = (rtx *) ggc_realloc_stat (reg_equiv_init, max_regno * sizeof (rtx) PASS_MEM_STAT);
> memset (®_equiv_init[orig_max_reg_num], 0, nregs * sizeof (rtx));
> regstat_n_sets_and_refs
> = ((struct regstat_n_sets_and_refs_t *)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ reload-v2]
2010-06-16 16:36 ` Jan Hubicka
@ 2010-06-16 16:38 ` Jeff Law
2010-06-16 16:50 ` Jan Hubicka
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Law @ 2010-06-16 16:38 UTC (permalink / raw)
To: Jan Hubicka; +Cc: gcc-patches
>
>> ggc_realloc is no longer supported, ggc_realloc_stat is the proper way
>> to do things now. This allows reload-v2 to bootstrap after monday's
>> merge from the trunk.
>>
> Well, it was definitly not intention of my statistics code to require
> users to add random PASS_MEM_STAT.
> There should be always corresponding macro hidding that.
>
OK. I just found another ggc_realloc call and copied what it did.
> Also your patch will not compile with --enable-gather-detailed-stats
> since you need MEM_STAT_INFO.
>
I'll take care of this.
Thanks,
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ reload-v2]
2010-06-16 16:38 ` Jeff Law
@ 2010-06-16 16:50 ` Jan Hubicka
0 siblings, 0 replies; 6+ messages in thread
From: Jan Hubicka @ 2010-06-16 16:50 UTC (permalink / raw)
To: Jeff Law; +Cc: Jan Hubicka, gcc-patches
>>
>>> ggc_realloc is no longer supported, ggc_realloc_stat is the proper way
>>> to do things now. This allows reload-v2 to bootstrap after monday's
>>> merge from the trunk.
>>>
>> Well, it was definitly not intention of my statistics code to require
>> users to add random PASS_MEM_STAT.
>> There should be always corresponding macro hidding that.
>>
> OK. I just found another ggc_realloc call and copied what it did.
Well, it is because it was inside _stat function.
those gets MEM_STAT_DECL that compiles to nothing unless you do detailed
mem stats and then it is source file and line, submitted by MEM_STAT_INFO.
However for some functions (like vec_reallocate) we don't want to record
the function itself and rather its callers, so then you create _stat
version of it getting MEM_STAT_DECL and use PASS_MEM_STAT to pass the info
further.
Honza
>
>> Also your patch will not compile with --enable-gather-detailed-stats
>> since you need MEM_STAT_INFO.
>>
> I'll take care of this.
>
>
> Thanks,
> Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ reload-v2]
2010-06-16 15:51 [ reload-v2] Jeff Law
2010-06-16 16:36 ` Jan Hubicka
@ 2010-06-17 8:20 ` Laurynas Biveinis
2010-06-21 21:50 ` Jeff Law
1 sibling, 1 reply; 6+ messages in thread
From: Laurynas Biveinis @ 2010-06-17 8:20 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches, hubicka
2010/6/16 Jeff Law <law@redhat.com>:
>
> ggc_realloc is no longer supported, ggc_realloc_stat is the proper way to do
> things now. This allows reload-v2 to bootstrap after monday's merge from
> the trunk.
There are two ggc_realloc replacements: GGC_RESIZEVEC and
GGC_RESIZEVAR. Do they work for you?
--
Laurynas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ reload-v2]
2010-06-17 8:20 ` Laurynas Biveinis
@ 2010-06-21 21:50 ` Jeff Law
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Law @ 2010-06-21 21:50 UTC (permalink / raw)
To: Laurynas Biveinis; +Cc: gcc-patches, hubicka
On 06/16/10 23:15, Laurynas Biveinis wrote:
> 2010/6/16 Jeff Law<law@redhat.com>:
>
>> ggc_realloc is no longer supported, ggc_realloc_stat is the proper way to do
>> things now. This allows reload-v2 to bootstrap after monday's merge from
>> the trunk.
>>
> There are two ggc_realloc replacements: GGC_RESIZEVEC and
> GGC_RESIZEVAR. Do they work for you?
>
I simply wasn't aware of them. I'm testing with GGC_RESIZEVEC right now.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-06-21 20:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-16 15:51 [ reload-v2] Jeff Law
2010-06-16 16:36 ` Jan Hubicka
2010-06-16 16:38 ` Jeff Law
2010-06-16 16:50 ` Jan Hubicka
2010-06-17 8:20 ` Laurynas Biveinis
2010-06-21 21:50 ` Jeff Law
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).