[LLVMdev] LLVM Source-to-Source transformation

kamals at iitk.ac.in kamals at iitk.ac.in
Sat Dec 15 09:31:36 PST 2007


Hi,

I plan to use LLVM for some compiler transformation.

My requirement is that I require a source to source transformation. I need
to parse the given program and look for loops. Then I need to create
another source file where I can use this source information like the
iteration bounds and the loop body into the new file. I was looking at the
LoopExtract pass in LLVM passes. However, it enables to extract only loop
body. I need some more information like variables used and array dimension
in loop body and convert it to source level.
Can this be done using llvm? Can I get some pointers on this.

My problem can be analogous viewed as adding OpenMP pragmas for auto
parallelization.

Regarsd,
Kamal




More information about the llvm-dev mailing list