[llvm-dev] The use of token type

Dounia Khaldi via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 2 19:34:12 PDT 2018


Hello,
I would like to add an intrinsic that returns a token type argument. The
equivalent in C that I found other builtins using is void *(coro_id for
instance).

My question is how to generate the code in CGBuiltins.cpp to generate token
type instead of void *. The usual code is not working.

The intrinsic I get generated is:
%1 = call token @llvm.new_intrinsic()

but it wants to convert the token into void* like the following:
%2 = bitcast token %1 to i8*
store i8* %2, i8** %myvariable

 How to get it to use directly token type like this:
%myvariale = call token @llvm.new_intrinsic()

Did anyone have done this before: token in the intrinsic and void* in the
builtin?

Thanks,
Dounia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180802/b7de6526/attachment.html>


More information about the llvm-dev mailing list