Fix BLOCK_SUPERCONTEXT for cilk produced functions

Jeff Law law@redhat.com
Fri Jul 18 05:06:00 GMT 2014


On 07/07/14 14:14, Jan Hubicka wrote:
>> On 07/04/14 03:05, Jan Hubicka wrote:
>>> Hi,
>>> BLOCK_SUPERCONTEXT for normal blocks leads all the way to FUNCTOIN_DECL.  This is not the case of some
>>> automatically generated functions, like one for cilk.  I think it is bug. This patch fixes cilk, I will
>>> look for other cases if that looks OK.
>>>
>>> Bootstrapped/regtested x86_64-linux
>>>
>>> Honza
>>>
>>> 	* cilk.c (create_cilk_helper_decl): Create toplevel block correctly.
>> But doesn't this put the CILK created FUNCTION_DECL within the scope FNDECL?
>
> I am not sure I understand your question...
> FNDECL is a newly created decl that will get its body filled in later. I
> believe the BLOCK_SUPERCONTEXT of its main block should be always FNDECL
> instead of NULL as for was majority of functions we produce...
> if that function contains code outlined from the main function, I think
> these are linked by ABSTRACT_ORIGIN.
Nevermind.  I was confused about the state fndecl & the context chains.

OK for the trunk and 4.9 if you think it's important to address there as 
well

jeff



More information about the Gcc-patches mailing list