[PATCH] Add loop unroll pragma support

Tyler Nowicki tnowicki at apple.com
Wed Jun 11 09:17:44 PDT 2014


Hi Mark,

On Jun 10, 2014, at 9:50 PM, Mark Heffernan <meheff at google.com> wrote:

> Thanks for the suggestions.  They have been addressed.  Pekka (cc'd) on the optimizer patch thread suggested changing the metadata string from  llvm.loopunroll.* to llvm.loop.unroll.*.  I like the suggestion as it partitions the namespace more logically.  It makes sense then similarly to change the existing  llvm.vectorizer.* and llvm.interleave.* names to llvm.loop.vectorizer.* and llvm.loop.interleave.*.  Anybody have an opinion?

I like those suggestions. Currently the vectorizer can only be enabled or disabled. I want to change this so that we can enable/disable vectorization and interleaving separately. The way metadata is handled in the vectorizer will need to be updated to accommodate this.

> If I do make this change, then there will be a mismatch between the emitted metadata names for the vectorizer and what the optimizer expects.  What's the protocol for handling this?  Is submitting the optimizer change immediately after this clang change good enough?

I asked about this earlier. LLVM and Clang are considered to be version locked or perhaps we should say version synced. The protocol is to simultaneously submit/commit patches for LLVM and Clang. There may be some build failures if there is a delay, but that shouldn’t be a problem because they will be fixed in a subsequent build.

I think you should hold off on changing the metadata until we can update both llvm and clang. I suggest you finish this patch without the metadata changes and we’ll work on that later.

Thanks for working on this!

Tyler



More information about the cfe-commits mailing list