in search of clue regarding -fcheck-memory-usage

Tristan Gingold tgi@netgem.com
Tue Jan 23 02:42:00 GMT 2001


On Mon, Jan 22, 2001 at 10:31:56AM -0800, Mark Mitchell wrote:
> >>>>> "Tristan" == Tristan Gingold <tgi@netgem.com> writes:
> 
>     Tristan> Being at the origin of the -fcheck-memory patches, I
>     Tristan> agree with you: it is too interleaved.  I think a
> 
> Cool!  That's nice of you to say.
> 
>     Tristan> separate pass on tree is the right way to do the job (RTL
>     Tristan> is really too late), but is there a single point of entry
>     Tristan> ?
> 
> There is in C and C++ now.  Look, for example, at cp/optimize.c to see
> how inlining is done entirely on trees.  You could do a similar pass
> to add memory checking calls.
Ok, this is a starting point.
Note that this may be not so simple:
* I am not sure how to correctly handling SAVE_EXPR,

* a function has to be called for each argument pushed in the stack.  This
  cannot be done on trees, AFAIK.

Tristan.


More information about the Gcc mailing list