This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix BLOCK_SUPERCONTEXT for cilk produced functions
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jeff Law <law at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 7 Jul 2014 22:14:30 +0200
- Subject: Re: Fix BLOCK_SUPERCONTEXT for cilk produced functions
- Authentication-results: sourceware.org; auth=none
- References: <20140704090536 dot GA25736 at kam dot mff dot cuni dot cz> <53BADD33 dot 2060002 at redhat dot com>
> 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.
Honza
>
> Though I guess that may be reasonable since these decls are created
> in response to the spawn keyword. To some degree they are nested
> within the scope of the current function.
>
> OK.
>
> jeff