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]

[RFC] Change last_annotated_node from tree to location_t *


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.


Attachment: t.diff.txt
Description: Text document


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