Hello, Is there a way such that one can insert #pragmas and /or comments in the IR such that the C code produced by llc has those pragmas which can be used later by another tool?. Say for example I have a pass that shall do some analysis and modifications to provided source code. Then I wish to parallelize the modified loop using open-MP by inserting openmp pragmas in the generated c code. regards, Kshitiz -- Kshitiz Garg Graduate Student Department of Computer Science & Engineering IIT Kanpur http://home.iitk.ac.in/~kshitizg
On May 8, 2009, at 9:38 PM, Kshitiz Garg wrote:> Hello, > Is there a way such that one can insert #pragmas and /or comments > in the IR such that the C code produced by llc has those pragmas which > can be used later by another tool?. > Say for example I have a pass that shall do some analysis and > modifications to provided source code. Then I wish to parallelize the > modified loop using open-MP by inserting openmp pragmas in the > generated c code.The llvm.annotate intrinsic is a good way to go. -Chris