This is the mail archive of the
mailing list for the GCC project.
Re: More memory reductions on PR c++/12850
> >We have function that gets compiled, its body released and later the
> >DECL_ARGUMENTS are accessed by use_thunk that gets to the structure by
> It's probably possible to have use_thunk not touch DECL_ARGUMENTS by
> recreating them from first principles.
> However, that's not easy, and certainly not appropriate for 3.4.
> So, I think you should revert your patch for now.
> These argument lists should not be terribly big, really. If they
> reference lots of other stuff via their DECL_RTL fields that might be a
> problem -- but you could then probably clear just DECL_RTL, since it
> doesn't look like that is examined by use_thunk.
I tested only disabling the removing of DECL_ARGUMENTS after function
compilation and keep it in other cases. This appears to work well and
does not bring any noticeable regressions.
I can do complete reversal, but then we will probably hit the testcase
that does not manage to get the "nested" bit wrong. The patch did also
proper removing of DECL_INITIAL and some cases of DECL_SAVED_INSNS that
makes a lot more difference (30 versus 66MB peak memory usage on
Does the attached patch look fine?
I kept the code removing DECL_ARGUMENTS of unreachable functions that
will be never output. I guess it is safe, it would be very strange to
produce thunk for function not output to the file, but I can revert that
2004-02-11 Jan Hubicka <firstname.lastname@example.org>
* tree-optimize.c (tree_rest_of_compilation): Do not free arguments.
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 2.10
diff -c -3 -p -r2.10 tree-optimize.c
*** tree-optimize.c 31 Jan 2004 02:06:48 -0000 2.10
--- tree-optimize.c 11 Feb 2004 10:45:21 -0000
*************** tree_rest_of_compilation (tree fndecl, b
*** 218,225 ****
If rest_of_compilation set this to 0, leave it 0. */
if (DECL_INITIAL (fndecl) != 0)
DECL_INITIAL (fndecl) = error_mark_node;
- DECL_ARGUMENTS (fndecl) = 0;
--- 218,223 ----