search for: irbuil

Displaying 3 results from an estimated 3 matches for "irbuil".

Did you mean: inbuilt
2017 Apr 08
2
How to insert vector type input parameter for function in C/C++ API?
...y C/C++ API from LLVM framework. I am using LLVM3.8. Basically, I want to generate TARGET (Refer to below) LLVM-IR code for SOURCE function by C/C++ API. As you see below, the AVX2 data type is __m256i which is vector type. How can I indicate vector type (function return type, input parameters) for IRBuiler by C/C++ APIs? I don't see any example online and please let me know if anybody has examples. SOURCE: #include "immintrin.h" __m256i sum(__m256i a, __m256i b) { return a+b; } TARGET: michael at michael-Precision-Tower-3420:~/Year_2017/work_DEMO$ cat avx2_add2.ll ; ModuleID...
2017 Apr 08
2
How to insert vector type input parameter for function in C/C++ API?
...opper at gmail.com> wrote: > To create a vector type you can call VectorType::get(<scalar element > type>, <num of elements>) and pass the output of that to the Type argument > when creating instructions. To get the scalar element type you can use the > get*Ty methods in IRBuilder or the Type::get*Ty methods. > > ~Craig > > On Fri, Apr 7, 2017 at 5:20 PM, Michael Choi via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> I am working on AVX2 code generation by LLVM framework. >> >> I want to generate LLVM-IR code for the follow...
2017 Apr 08
3
How to insert vector type input parameter for function in C/C++ API?
...gt;>> To create a vector type you can call VectorType::get(<scalar element >>> type>, <num of elements>) and pass the output of that to the Type argument >>> when creating instructions. To get the scalar element type you can use the >>> get*Ty methods in IRBuilder or the Type::get*Ty methods. >>> >>> ~Craig >>> >>> On Fri, Apr 7, 2017 at 5:20 PM, Michael Choi via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >>>> I am working on AVX2 code generation by LLVM framework. >>...