[llvm-dev] Mangled SPIR function name
Frank Winter via llvm-dev
llvm-dev at lists.llvm.org
Mon Jan 3 13:33:43 PST 2022
"clang -triple spir64 .." would generate from an OpenCL statement like
uint idx = get_global_id(0);
something like this:
%0 = call i64 @_Z13get_global_idj(i32 0)
Note it generates the mangled form.
Using only LLVM builder tools, i.e. no clang, how can I generate this mangled form?
Using Module::getOrInsertFunction( "_Z13get_global_idj" , .... ) seems little portable.
Assuming that I'm building a "spir_kernel", is the above (simple) solution safe enough?
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220103/e085e067/attachment.html>
More information about the llvm-dev
mailing list