<html><body><p>Hi Dounia,<br><br>I work on the NVPTX OpenMP codegen support and we don't use fork() but I can point you to where you may be able to find this information.<br><br>In the clang sources, have a look at: lib/CodeGen/CGOpenMPRuntime.cpp and the function createRuntimeFunction where the call to __kmpc_fork_call() is created.  The type of the outlined function can be had through the function: getKmpc_MicroPointerTy().  Is this what you are looking for?<br><br>Regards,<br>Arpith<br><br><tt>"Openmp-dev" <openmp-dev-bounces@lists.llvm.org> wrote on 07/30/2016 12:38:09 PM:<br><br>> From: via Openmp-dev <openmp-dev@lists.llvm.org></tt><br><tt>> To: Dounia Khaldi <khaldi.dounia@gmail.com>, openmp-dev@lists.llvm.org</tt><br><tt>> Cc: llvmdev@cs.uiuc.edu</tt><br><tt>> Date: 07/30/2016 12:38 PM</tt><br><tt>> Subject: Re: [Openmp-dev] [llvm-dev] How to get the function <br>> definition of a kmpc_micro call</tt><br><tt>> Sent by: "Openmp-dev" <openmp-dev-bounces@lists.llvm.org></tt><br><tt>> <br>> Adding openmp-dev list.</tt><br><tt>> <br>> 30 июля 2016 г., в 5:09, Dounia Khaldi via llvm-dev <llvm-dev@lists.llvm.org<br>> > написал(а):<br></tt><br><tt>> Hello,</tt><br><tt>> <br>> The third argument of the OpenMP runtime call __kmpc_fork_call is <br>> the outlined function resulting from omp parallel directive; this is<br>> of type kmpc_micro. I can get this argument as an LLVM value by <br>> using (callInst->getArgOperand...), but once I get this value, i am <br>> stuck in knowing its class type. An example of this value can be: </tt><br><tt>> void (i32*, i32*, ...)* bitcast (void (i32*, i32*, double**, <br>> double**, double**, double**, double**, double*, i32*, double*, <br>> double*, i32**, double**, i32**, double*)* @.omp_outlined..45 to <br>> void (i32*, i32*, ...)*)</tt><br><tt>> <br>> I tried bitcast instruction, instruction, function call and did not work.</tt><br><tt>> <br>> Is there  a clean way (other than manipulating strings) to get the <br>> defintion of the outlined function from the call  __kmpc_fork_call? <br>> By clean I mean where I can manipulate IR and LLVM methods (and not <br>> compare strings). </tt><br><tt>> <br>> Thanks in advance for any help,</tt><br><tt>> <br>> <br>> -- </tt><br><tt>> Dounia KHALDI</tt><br><tt>> Research Assistant Professor</tt><br><tt>> Institute for Advanced Computational Science</tt><br><tt>> Stony Brook University</tt><br><tt>> Stony Brook, NY 11794-5250</tt><br><tt>> www.iacs.stonybrook.edu</tt><br><tt>> <br>> _______________________________________________<br>> LLVM Developers mailing list<br>> llvm-dev@lists.llvm.org<br>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>> _______________________________________________<br>> Openmp-dev mailing list<br>> Openmp-dev@lists.llvm.org<br>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br></tt><BR>
</body></html>