[cfe-dev] annotating loop statements

Richard Smith richard at metafoo.co.uk
Thu Feb 7 15:55:37 PST 2013


On Thu, Feb 7, 2013 at 1:41 PM, Redmond, Paul <paul.redmond at intel.com>wrote:

> Could I use AttributedStmt for this? I don't see it being used for
> anything else..
>

Yes, AttributedStmt would be appropriate here. It's also used to represent
C++11 attributes applied to a statement.


> paul
>
> On 2013-02-07, at 12:45 PM, Redmond, Paul wrote:
>
> > Hi,
> >
> > I'm working on #pragma ivdep [1] 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.
> >
> > thanks,
> > Paul
> >
> > [1]
> http://software.intel.com/sites/products/documentation/studio/composer/en-us/2011Update/compiler_c/cref_cls/common/cppref_pragma_ivdep.htm
> >
> >
> > <parser_ivdep.diff>_______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130207/c8ff43d0/attachment.html>


More information about the cfe-dev mailing list