Hi Richard,

Thanks for the detailed review!

I went with the last syntax you suggested. Seems simple to me and easily extendable: #pragma clang loop vectorize_width(2) interleave_count(4).

Also it helped clean up a lot of the ambiguity you talked about in the LoopHintAttr. A single integer Value has replaced the Kind (Enable/Disable/Value) and a integer value there previously. Hopefully it won’t be too difficult to support constant expressions, and non-type template parameters. I’ll work on those patches next.

I also improved the incompatibility testing as well. I realized there were several cases my previous test wasn’t identifying.


Objective C is a proper superset of C, so yes. I don't know Objective C very well either, and it might be the case that it would never be possible to vectorize its for loop, because it's too dynamic.

Ok, its on my list.


I think you want (and what the approach I described above permits) is to callParseConstantExpression.

I think I understand now what you are suggesting. Your thinking that the _expression_ may include more than one token. I gave it a try, but I wasn’t able to get it to work. The _expression_ returned by ParseConstantExpression was always invalid. Perhaps I didn’t implement it correctly. I’m capturing all of the tokens between the brackets and then when handling the annotated token I reinserted them into the stream and called ParseConstantExpression. I tried it with and without the brackets and with and without a trailing eof token. The LHS and Res expressions parsed in ParseConstantExpression were also always invalid <<NULL>>. Lets leave this and other constant _expression_ work for a later patch.


Here is the updated patch.

Tyler

Attachment: pragma_loop-svn.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to