Browse through omp-low.c.  In particular create_omp_child_function

I understand the beginning of the function with its declaration of the function but I have a question about these lines :

/* Allocate memory for the function structure.  The call to
     allocate_struct_function clobbers CFUN, so we need to restore
     it afterward.  */
  allocate_struct_function (decl);
  DECL_SOURCE_LOCATION (decl) = EXPR_LOCATION (ctx->stmt);
  cfun->function_end_locus = EXPR_LOCATION (ctx->stmt);
  cfun = ctx->cb.src_cfun;

Is that a necessary process for the declaration of a function ? I ask because I do not want the compiler to compile directly my function but rather ask the linker to take care of that (it will be an external function).

and expand_omp_parallel.

I notice that at the end of that function there is a call to expand_parallel_call and in that function I don't see a difference with how I prepare the arguments.

This leads me to think that the problem lies with the declaration of the function, am I correct ?

The new function needs to be added to the call
graph and queued for processing (cgraph_add_new_function).

This would be true if I wanted it to be compiled but if I do not (using a precompiled version) ?

Thank you for your time,
Jc
-----------------------------------------------------
‹Degskalle› There is no point in arguing with an idiot, they will just
drag you down to their level and beat you with experience

Référence: http://www.bash.org/?latest
-----------------------------------------------------


Reply via email to