More memory reductions on PR c++/12850

Mark Mitchell mark@codesourcery.com
Wed Feb 11 15:36:00 GMT 2004


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



More information about the Gcc-patches mailing list