[LLVMdev] Support for per-loop pragma

Chris Lattner clattner at apple.com
Wed May 19 15:45:37 PDT 2010


On May 19, 2010, at 2:38 PM, Junjie Gu wrote:

> Many compilers support per-loop pragma, such as loop unrolling (ie
> #pragma unroll=2).  Is there any LLVM project/effort going on
> in this area ? What is the expected way for implementing per-loop
> pragma, or general pragma ?  Suggestions/comments ?

Hi Junjie,

I don't know of anyone working on it, but it seems like a natural application of the metadata support in mainline:
http://blog.llvm.org/2010/04/extensible-metadata-in-llvm-ir.html

We'd want to tag something, perhaps the backedge branches with metadata, then have the loop canonicalization passes preserve them.

-Chris



More information about the llvm-dev mailing list