This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFC/PR28071]: New scheduler dependencies lists.


Hi,
the memory tester jammed for last week, but looking at the results
on the PR28071 -O3 compilation at:
http://www.suse.de/~gcctest/memory/graphs/index.html
it looks like that while this patch sucesfully addressed the compilation
time issues, the overall memory consumption increased noticeably (100MB,
or 20%)

I think it might be caused just by suboptimal allocation (as the lists
with extra pointer should not consume more memory just because RTL
containers did needed extra 64bits too).

Looking at the code:
> +/* Allocate deps_list.
> +
> +   If ON_OBSTACK_P is true, allocate the list on the obstack.  This is done for
> +   INSN_FORW_DEPS lists because they should live till the end of scheduling.
> +
> +   INSN_BACK_DEPS and INSN_RESOLVED_BACK_DEPS lists are allocated on the free
> +   store and are being freed in haifa-sched.c: schedule_insn ().  */
> +static deps_list_t
> +alloc_deps_list (bool on_obstack_p)
> +{
> +  if (on_obstack_p)
> +    return obstack_alloc (dl_obstack, sizeof (struct _deps_list));
> +  else
> +    return xmalloc (sizeof (struct _deps_list));
> +}

This seems to be obvious candidate for allocpools instead of
this obstack/xmalloc hybrid scheme. Also I am just curious, what is the
advantage of using the pointers back to the next field instead of usual
doubly linked list?
Thanks for all the hard work!

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]