I am new to Clang and somewhat new to LLVM. I am doing a project where I need to instrument C code to add some profiling information such as timers and iteration counts of loops to some of the functions and then it will be compiled using clang+llvm. The transformation need not be source to source. All I am looking for is the ability to add instrumentation at some point during the compilation process. Is it reasonable to attempt to modify Clang so that it adds timers and logging calls at the places I need? Or should I be looking at some other part of the LLVM stack?