search for: getintrinsic

Displaying 5 results from an estimated 5 matches for "getintrinsic".

2018 Sep 24
4
Writing simple intrinsic in clang
I want to write a simple backend-specific instrinsic that will just call an instruction. How should I do that? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180924/7faeeb3d/attachment.html>
2018 Sep 06
2
Adding an trinsics in x86
...x_qb, "V2iV2iV2i", "ncV:64:", "") //I don't know the meaning of these parameters, just write according to the add function. In src/tools/clang/lib/CodeGen/CGBuiltin.cpp. in function EmitX86BuiltinExpr case X86::BI__builtin_x86_max_qb:{ return Builder.CreateCall(CGM.getIntrinsic(Intrinsic::x86_max_qb)); } Then I do a simple test,just like this: #include <stdlib.h> #include <stdio.h> int main() { int a, b, c; a=1;b=2; c = int_x86_max_qb(a, b); } When I use clang to compile,there is a warning:implicit declaration of function 'int_x86_max_qb' is invalid i...
2013 Oct 10
3
[LLVMdev] A new builtin: __builtin_stack_pointer()
..."vv**i", "r") diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index d187678..f66f506 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -736,6 +736,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, Value *F = CGM.getIntrinsic(Intrinsic::frameaddress); return RValue::get(Builder.CreateCall(F, Depth)); } + case Builtin::BI__builtin_stack_pointer: { + Value *StackAddr = + Builder.CreateCall(CGM.getIntrinsic(Intrinsic::stacksave)); + return RValue::get(StackAddr); + } case Builtin::BI__builtin_extrac...
2016 Jul 28
0
Help wanted: Overloading an Intinsic
Hi David, The error shows that the clang source code uses this intrinsic as well, but in the old form. You need to modify the clang source code (where this intrinsic is used) to consider the overloaded operands. The assert would show the trace where clang uses this intrinsic. Hope this helps, Anna > On Jul 26, 2016, at 3:21 PM, David Noursi via llvm-dev <llvm-dev at lists.llvm.org>
2016 Jul 26
2
Help wanted: Overloading an Intinsic
Hello All, I have been modifying LLVM a project of mine, and have encountered issues with overloading an intrinsic function. I have defined two types, abit (which is mapped, in Intrinsics.td, to i128) and qbit (accordingly mapped to i16). I would like my intrinsic function, CNOT(x,y), to accept either an abit or a qbit for each argument, so I overload with iAny and llvm_anyint_ty, as seemed to