Number of variable arguments to microtask in __kmp_invoke_microtask

Hi all,

I noticed that clang generates code with only one “variable argument” to __kmpc_fork_call (i.e. ultimately to __kmp_invoke_microtask) - that is the struct.anon pointer that contains the pointers to all arguments used in the microtask.

I tried with multiple cases, but I always get the same number of arguments passed to the invoke_microtask function.

  • Does anyone know about examples in which more arguments are used? I tried examples which reference a different number of arrays and shared variables, but nothing changes.

  • Do other compilers targeting libiomp make use of the variable argument array to store the microtask arguments (instead of using a struct of pointers)?

Thanks for any help

– Carlo

This is discussed in the manual http://openmp.llvm.org/Reference.pdf (See P3). (Amazing, eh!)

  • Do other compilers targeting libiomp make use of the variable argument array to store the microtask arguments (instead of using a struct of pointers)?
    The intel compiler uses multiple arguments.

I’m not sure how much time we’d save by having a specialised entrypoint for the single argument case. (Specialising based on the argument count in the existing code shouldn’t be very expensive, since it would be one test and perfectly predicted branch).

Thanks for the pointer - very useful.

I was not proposing a specialized entry point.

– Carlo

graycol.gif"Cownie, James H" —06/12/2014 04:42:49 AM—This is discussed in the manual http://openmp.llvm.org/Reference.pdf (See P3). (Amazing, eh!) - Do o