Hi Tim,

> From gcc online docs (http://gcc.gnu.org/onlinedocs/libgomp/), I found
> documentations for most of OpenMP constructs, except one very
> important construct TASK.

I cannot answer this. It may be that the documentation was written
before tasks (which were introduced in a latter versionĀ  of OpenMP)
were added to GCC OpenMP.

>
> I don't know why it is missing, but I really
> need to find out how TASK get transformed into GOMP_* routines. I
> posted this question before, but haven't got a reply yet. I am very
> grateful if someone can point me to the right track. For example, is
> there a pretty-print feature of the AST after processing the OpenMP
> pragmas? If so, how? Of course, if someone have the expertise, and
> directly show me how TASK get transformed, it would be even better!


For the pretty print, just use -fdump-tree-ompexp-all on the compile
line and look for the file *.c.*ompexp that is generated. It contains
the dump just after OpenMP expansion.

If you need to check out the code generation routines by yourself,
take a look at gcc/omp-low.c
Most of everything happens there. There are two passes, OpenMP
lowerring then expansion. The generation of the GOMP_* routine calls
happens during expansion pass and so you should start from the
"expand_omp_taskreg" function (in gcc/omp-low.c).

Best,
Antoniu

Reply via email to