From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18077 invoked by alias); 6 Oct 2009 03:09:38 -0000 Received: (qmail 18069 invoked by uid 22791); 6 Oct 2009 03:09:37 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-vw0-f182.google.com (HELO mail-vw0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Oct 2009 03:09:33 +0000 Received: by vws12 with SMTP id 12so916131vws.8 for ; Mon, 05 Oct 2009 20:09:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.113.83 with SMTP id z19mr251823vcp.49.1254798572090; Mon, 05 Oct 2009 20:09:32 -0700 (PDT) In-Reply-To: <1b8617c60910041229lff0c3f5re8c3ed26b7bcc3f7@mail.gmail.com> References: <1104fbfa0910032000h3343125v2f07ee4d283bf5ee@mail.gmail.com> <1b8617c60910041229lff0c3f5re8c3ed26b7bcc3f7@mail.gmail.com> Date: Tue, 06 Oct 2009 03:09:00 -0000 Message-ID: <1104fbfa0910052009i3000316bpe06d06ae5acd55dd@mail.gmail.com> Subject: Re: OpenMP 3.0 libgomp ABI documentation for TASK construct From: Qihang Huang To: Antoniu Pop Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg00102.txt.bz2 That's super! Thank you Antoniu. With the capacity of printing the expanded code, it feels a lot more freedom now when reading the source code of libgomp. Cheers, Tim On Mon, Oct 5, 2009 at 8:29 AM, Antoniu Pop wrote: > 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=A0 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 >