[RFC] Change last_annotated_node from tree to location_t *
Andrew Pinski
pinskia@physics.uc.edu
Tue Aug 2 00:26:00 GMT 2005
The problem here is that last_annotated_node keeps the full tree node
in GC
which means that we can leak the whole function body and all the basic
blocks
or the whole function tree depending on if the tree was in an unused
static
function or in a function which goes though optimization. This fixes
the
problem by only keep tracking of the location_t instead. This code
would
go away when non USE_MAPPED_LOCATION mode goes away but that looks like
it is not going away for 4.1.0 which is sad. The only thing blocking
USE_MAPPED_LOCATION now is the Ada front-end and has been for now 6
months.
This was ___not___ bootstrapped as I don't have time right now and I
wanted to double check if this is the correct way to fix this problem.
Thanks,
Andrew Pinski
ChangeLog:
* tree.c (last_annotated_node): Change type to location_t*.
(annotate_with_file_line): Reflect the change of
last_annotated_node type.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050802/64c852f2/attachment.txt>
More information about the Gcc-patches
mailing list