Dounia Khaldi via llvm-dev
2016-Jul-30 02:09 UTC
[llvm-dev] How to get the function definition of a kmpc_micro call
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160729/0681fd24/attachment.html>