[PATCH] #pragma vectorize

Alexander Musman alexander.musman at gmail.com
Mon Apr 28 04:47:30 PDT 2014


Hi Tyler,

Please add checks for input numbers - e.g., adding #pragma loop
interleave(3000000000) leads to metadata with negative number !{metadata
!"llvm.vectorizer.unroll", i32 -1294967296}
CGStmt.cpp:585 - please add a space after //

Do you plan to support substitution of integer template parameters into
pragma? Here is example:
>cat ploop.cpp
template <int VLEN> void while_test(int *List, int Length) {
  int i = 0;
  #pragma loop vectorize(VLEN)
  while(i < Length) {
    List[i] = i*2;
    i++;
  }
}
int main() {
    int L[100];
    while_test<4> (L, 100);
    return 0;
}

ParsePragma.cpp:1619: // Read '('
This looks like a good place to use BalancedDelimiterTracker for parsing
'(' and ')'.

Regarding contradictory directives - I think they would be better to detect
them/emit errors in front-end, so that  their uses in back-end can assume
they are correct.

test/CodeGen/pragma-loop.cpp:69
// Verify c11 for range loop is recognized after
I guess this comment should say 'c++11'

Best regards,
Alexander




2014-04-28 5:35 GMT+04:00 Chandler Carruth <chandlerc at google.com>:

>
> On Sun, Apr 27, 2014 at 5:00 PM, Tyler Nowicki <tnowicki at apple.com> wrote:
>
>> - I don’t know Doug or Richard, could you add them to the cc-list.
>
>
> Adding Doug. ;]
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140428/e025c071/attachment.html>


More information about the cfe-commits mailing list