java.lang.Object
dev.civl.abc.transform.IF.BaseTransformer
dev.civl.mc.transform.IF.OpenMPSimplifier
- All Implemented Interfaces:
dev.civl.abc.transform.IF.Transformer
public class OpenMPSimplifier
extends dev.civl.abc.transform.IF.BaseTransformer
This transformer analyzes OpenMP constructs and converts them to simpler,
i.e., less concurrent, instances of constructs.
This transform operates in two phases:
1) Analyze OpenMP workshares to determine those that are provably
thread-independent, i.e., execution of workshares in parallel is guaranteed
to compute the same result.
2) Transform OpenMP constructs based on the analysis results.
TBD: a) support nowait clauses b) support collapse clauses (confirm whether
collapse uses variables or the first "k" row indices) c) what is the
semantics of a parallel region with no pragma, i.e., do we have to reason
about its independence to remove the parallel pragma d) intra-iteration
dependences, e.g., x[i] = x[i] + a; e) critical, barrier, master, single and
other workshares f) calling sensitive parallel workshare nesting, i.e.,
caller has parallel pragma, callee has workshare g) semantics of nowait for
that continues to method return h) treatment of omp_ calls, i.e., should we
preserve the parallelism since the calls likely depend on it i) detect
non-escaping heap data from within a omp pragma context, e.g.,
fig4.98-threadprivate.c j) default private/shared when there are explicit
shared/private clauses that don't mention the var
-
Field Summary
FieldsFields inherited from class dev.civl.abc.transform.IF.BaseTransformer
astFactory, code, longName, nodeFactory, shortDescription -
Constructor Summary
ConstructorsConstructorDescriptionOpenMPSimplifier(dev.civl.abc.ast.IF.ASTFactory astFactory, CIVLConfiguration config) -
Method Summary
Methods inherited from class dev.civl.abc.transform.IF.BaseTransformer
getCode, getConfiguration, getShortDescription, newStringLiteralNode, toString
-
Field Details
-
CODE
- See Also:
-
LONG_NAME
- See Also:
-
SHORT_DESCRIPTION
- See Also:
-
-
Constructor Details
-
OpenMPSimplifier
-
-
Method Details
-
transform
public dev.civl.abc.ast.IF.AST transform(dev.civl.abc.ast.IF.AST ast) throws dev.civl.abc.token.IF.SyntaxException - Throws:
dev.civl.abc.token.IF.SyntaxException
-