[cfe-dev] annotating loop statements
paul.redmond at intel.com
Thu Feb 7 09:45:27 PST 2013
I'm working on #pragma ivdep  in clang and I'm looking for advice on the best way to annotate ForStmt/WhileStmt/DoStmt with the ivdep hint. I've attached my work in progress which handles parsing.
I think there are two options:
1) add a flag to ForStmt/WhileStmt/DoStmt and toggle it in the parser
2) create a new statement (one that wraps a ForStmt/WhileStmt/DoStmt) that includes the flags
Option 1) is simple but I do not think it's very clean or extensible. I think 2) is the most flexible because it could be extended to support #pragma simd for example.
I think this is a common problem for openmp, amp, cilk, etc. and it'd be nice to have a solution that can work for anyone.
I'm not a clang expert by any means so I'd appreciate any input.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6789 bytes
More information about the cfe-dev