[Openmp-dev] [llvm-dev] How to get the function definition of a kmpc_micro call

Arpith C Jacob via Openmp-dev openmp-dev at lists.llvm.org
Sat Jul 30 15:47:20 PDT 2016


Hi Dounia,

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.

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?

Regards,
Arpith

"Openmp-dev" <openmp-dev-bounces at lists.llvm.org> wrote on 07/30/2016
12:38:09 PM:

> From: via Openmp-dev <openmp-dev at lists.llvm.org>
> To: Dounia Khaldi <khaldi.dounia at gmail.com>, openmp-dev at lists.llvm.org
> Cc: llvmdev at cs.uiuc.edu
> Date: 07/30/2016 12:38 PM
> Subject: Re: [Openmp-dev] [llvm-dev] How to get the function
> definition of a kmpc_micro call
> Sent by: "Openmp-dev" <openmp-dev-bounces at lists.llvm.org>
>
> Adding openmp-dev list.
>
> 30 июля 2016 г., в 5:09, Dounia Khaldi via llvm-dev
<llvm-dev at lists.llvm.org
> > написал(а):

> Hello,
>
> The third argument of the OpenMP runtime call __kmpc_fork_call is
> the outlined function resulting from omp parallel directive; this is
> of type kmpc_micro. I can get this argument as an LLVM value by
> using (callInst->getArgOperand...), but once I get this value, i am
> stuck in knowing its class type. An example of this value can be:
> void (i32*, i32*, ...)* bitcast (void (i32*, i32*, double**,
> double**, double**, double**, double**, double*, i32*, double*,
> double*, i32**, double**, i32**, double*)* @.omp_outlined..45 to
> void (i32*, i32*, ...)*)
>
> I tried bitcast instruction, instruction, function call and did not work.
>
> Is there  a clean way (other than manipulating strings) to get the
> defintion of the outlined function from the call  __kmpc_fork_call?
> By clean I mean where I can manipulate IR and LLVM methods (and not
> compare strings).
>
> Thanks in advance for any help,
>
>
> --
> Dounia KHALDI
> Research Assistant Professor
> Institute for Advanced Computational Science
> Stony Brook University
> Stony Brook, NY 11794-5250
> www.iacs.stonybrook.edu
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20160730/32081033/attachment.html>


More information about the Openmp-dev mailing list