[cfe-dev] [RFC] OpenMP Support in Clang

Alexey Bataev a.bataev at hotmail.com
Tue Feb 12 04:26:27 PST 2013

Hello everybody,
I'd like to discuss representation of OpenMP directives and clauses in AST.
I'm trying to solve this problem by introducing new Stmt-based classes for
each executable directive and clause. But there is a class AttributedStmt
with some remarkable comment:
/// Represents an attribute applied to a statement. For example:
///   [[omp::for(...)]] for (...) { ... }

So, what is preferred solution? Introduce new Stmt classes for directives
and clauses or it would be better to try to represent them as attributes and
to use existing class AttributedStmt?
If we'll try to use the second approach (attributes) then I think I have to
represent each directive and clause as a particular attribute, so the
statement will look like:
[[omp::parallel]] [[omp::if(expr)]] [[omp::private(var1, var2, ...)]]...

Best regards,
Alexey Bataev
Software Engineer
Intel Compiler Team
Intel Corp. 
View this message in context: http://clang-developers.42468.n3.nabble.com/RFC-OpenMP-Support-in-Clang-tp4029194p4030417.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list