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: [PATCH, PR 58389] Do not attempt to use reference descriptions associated with removed edges


> Hi,
> 
> PR 58389 is another case where the reference removal code, which is
> now also called from the edge removal hook, ICEs when inlined edges
> are not removed in topological order, which ins not the case when we
> are removing unreachable nodes.
> 
> I'd like to fix it by the patch below.  When removing an edge which
> has a reference descriptor pointing back to it, we set that pointer to
> NULL and check for non-NULLness when we want to use it.  Reference
> descriptors die only when their allocation pool does so that pointer
> is never stale.
> 
> Bootstrapped and tested on x86_64-linux, OK for trunk?
> 
> Thanks,
> 
> Martin
> 
> 
> 2013-09-11  Martin Jambor  <mjambor@suse.cz>
> 
> 	PR ipa/58389
> 	* ipa-prop.c (remove_described_reference): Give up if the edge in the
> 	reference descriptor is NULL.
> 	(ipa_edge_removal_hook): If owning a reference descriptor, set its
> 	edge to NULL.

OK,
thanks
Honza


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