opencl - use of basic blocks in extracting features from llvm bitcode file -
i'm new llvm , clang , working on extracting opencl kernel features bitcode file generated using clang , libclc. info on this.
this extracts number of operations in kernel file, first converted bitcode file , parsed. works if there no loops in kernel file or if number of iterations of loop less 25. iterations less 25, number of basic blocks detected 1 , correct number of operations detected, if more 25, number of basic blocks increase , number of operations counted wrong.
i'm struggling understand basic blocks , what's going on here.
the opencl kernel file use quite simple 1 kernel:
__kernel void func(__global float *a, __global float *b, __global float *c){ int = get_global_id(0); float temp = a[i]; for(int i=0; i<26; i++){ temp *= b[i]; } c[i] = a[i] + temp; }
would appreciate on this. thanks.
Comments
Post a Comment