[LLVMdev] inserting #pragmas and comments?

Chris Lattner clattner at apple.com
Mon May 11 10:47:25 PDT 2009

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.


More information about the llvm-dev mailing list