Instrumenting CUDA code using LLVM (NVVM) - IR

Hi,

I want to instrument (i.e. insert a call to my own book-keeping function) all CUDA kernel and device procedures.

Does LLVM has an utility to compile CUDA code so that I have access to LLVM-IR and modify to add my instrumentation ?

Regards,

Subrata

https://github.com/apc-llc/nvcc-llvm-ir