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: More memory reductions on PR c++/12850


Jan Hubicka wrote:

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
THUNK_TARGET.




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
Gerald's testcase)

Does the attached patch look fine?

OK.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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