[llvm-dev] LLVM JIT Compilation

hameeza ahmed via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 16 10:49:18 PDT 2017


Hello,

Can someone point me to some good tutorials for JIT in LLVM.

My understanding of JIT is it is like llc; it takes optimized bit code
(generated via opt) and compiles it at run time instead of static
compilation. for example i have a loop which adds 2 user  input numbers. so
my cpp file becomes:

int main()
{
num1[1000], num2[1000];
//take input in these arrays at run time using scanf.

scanf("%d",num1);
scanf("%d",num2);

for (int i=0;i<1000;i++);
{
num1+num2;
}

so if i pass this through opt for auto vectorization. i keep vector
width=32, i get optimized IR.
then instead of passing the IR through llc i pass it through jit (lli). now
i get run  time compilation. at run time my vectorized IR code
<32xi32>emits vector assembly something like avx/ simd instructions.

Am i right? please guide me.

Thank You
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170816/3a2dde1c/attachment.html>


More information about the llvm-dev mailing list