gccint: OpenMP

1 
1 11.7.7 OpenMP
1 -------------
1 
1 All the statements starting with 'OMP_' represent directives and clauses
1 used by the OpenMP API <http://www.openmp.org/>.
1 
1 'OMP_PARALLEL'
1 
1      Represents '#pragma omp parallel [clause1 ... clauseN]'.  It has
1      four operands:
1 
1      Operand 'OMP_PARALLEL_BODY' is valid while in GENERIC and High
1      GIMPLE forms.  It contains the body of code to be executed by all
1      the threads.  During GIMPLE lowering, this operand becomes 'NULL'
1      and the body is emitted linearly after 'OMP_PARALLEL'.
1 
1      Operand 'OMP_PARALLEL_CLAUSES' is the list of clauses associated
1      with the directive.
1 
1      Operand 'OMP_PARALLEL_FN' is created by 'pass_lower_omp', it
1      contains the 'FUNCTION_DECL' for the function that will contain the
1      body of the parallel region.
1 
1      Operand 'OMP_PARALLEL_DATA_ARG' is also created by
1      'pass_lower_omp'.  If there are shared variables to be communicated
1      to the children threads, this operand will contain the 'VAR_DECL'
1      that contains all the shared values and variables.
1 
1 'OMP_FOR'
1 
1      Represents '#pragma omp for [clause1 ... clauseN]'.  It has six
1      operands:
1 
1      Operand 'OMP_FOR_BODY' contains the loop body.
1 
1      Operand 'OMP_FOR_CLAUSES' is the list of clauses associated with
1      the directive.
1 
1      Operand 'OMP_FOR_INIT' is the loop initialization code of the form
1      'VAR = N1'.
1 
1      Operand 'OMP_FOR_COND' is the loop conditional expression of the
1      form 'VAR {<,>,<=,>=} N2'.
1 
1      Operand 'OMP_FOR_INCR' is the loop index increment of the form 'VAR
1      {+=,-=} INCR'.
1 
1      Operand 'OMP_FOR_PRE_BODY' contains side effect code from operands
1      'OMP_FOR_INIT', 'OMP_FOR_COND' and 'OMP_FOR_INC'.  These side
1      effects are part of the 'OMP_FOR' block but must be evaluated
1      before the start of loop body.
1 
1      The loop index variable 'VAR' must be a signed integer variable,
1      which is implicitly private to each thread.  Bounds 'N1' and 'N2'
1      and the increment expression 'INCR' are required to be loop
1      invariant integer expressions that are evaluated without any
1      synchronization.  The evaluation order, frequency of evaluation and
1      side effects are unspecified by the standard.
1 
1 'OMP_SECTIONS'
1 
1      Represents '#pragma omp sections [clause1 ... clauseN]'.
1 
1      Operand 'OMP_SECTIONS_BODY' contains the sections body, which in
1      turn contains a set of 'OMP_SECTION' nodes for each of the
1      concurrent sections delimited by '#pragma omp section'.
1 
1      Operand 'OMP_SECTIONS_CLAUSES' is the list of clauses associated
1      with the directive.
1 
1 'OMP_SECTION'
1 
1      Section delimiter for 'OMP_SECTIONS'.
1 
1 'OMP_SINGLE'
1 
1      Represents '#pragma omp single'.
1 
1      Operand 'OMP_SINGLE_BODY' contains the body of code to be executed
1      by a single thread.
1 
1      Operand 'OMP_SINGLE_CLAUSES' is the list of clauses associated with
1      the directive.
1 
1 'OMP_MASTER'
1 
1      Represents '#pragma omp master'.
1 
1      Operand 'OMP_MASTER_BODY' contains the body of code to be executed
1      by the master thread.
1 
1 'OMP_ORDERED'
1 
1      Represents '#pragma omp ordered'.
1 
1      Operand 'OMP_ORDERED_BODY' contains the body of code to be executed
1      in the sequential order dictated by the loop index variable.
1 
1 'OMP_CRITICAL'
1 
1      Represents '#pragma omp critical [name]'.
1 
1      Operand 'OMP_CRITICAL_BODY' is the critical section.
1 
1      Operand 'OMP_CRITICAL_NAME' is an optional identifier to label the
1      critical section.
1 
1 'OMP_RETURN'
1 
1      This does not represent any OpenMP directive, it is an artificial
1      marker to indicate the end of the body of an OpenMP.  It is used by
1      the flow graph ('tree-cfg.c') and OpenMP region building code
1      ('omp-low.c').
1 
1 'OMP_CONTINUE'
1 
1      Similarly, this instruction does not represent an OpenMP directive,
1      it is used by 'OMP_FOR' (and similar codes) as well as
1      'OMP_SECTIONS' to mark the place where the code needs to loop to
1      the next iteration, or the next section, respectively.
1 
1      In some cases, 'OMP_CONTINUE' is placed right before 'OMP_RETURN'.
1      But if there are cleanups that need to occur right after the
1      looping body, it will be emitted between 'OMP_CONTINUE' and
1      'OMP_RETURN'.
1 
1 'OMP_ATOMIC'
1 
1      Represents '#pragma omp atomic'.
1 
1      Operand 0 is the address at which the atomic operation is to be
1      performed.
1 
1      Operand 1 is the expression to evaluate.  The gimplifier tries
1      three alternative code generation strategies.  Whenever possible,
1      an atomic update built-in is used.  If that fails, a
1      compare-and-swap loop is attempted.  If that also fails, a regular
1      critical section around the expression is used.
1 
1 'OMP_CLAUSE'
1 
1      Represents clauses associated with one of the 'OMP_' directives.
1      Clauses are represented by separate subcodes defined in 'tree.h'.
1      Clauses codes can be one of: 'OMP_CLAUSE_PRIVATE',
1      'OMP_CLAUSE_SHARED', 'OMP_CLAUSE_FIRSTPRIVATE',
1      'OMP_CLAUSE_LASTPRIVATE', 'OMP_CLAUSE_COPYIN',
1      'OMP_CLAUSE_COPYPRIVATE', 'OMP_CLAUSE_IF',
1      'OMP_CLAUSE_NUM_THREADS', 'OMP_CLAUSE_SCHEDULE',
1      'OMP_CLAUSE_NOWAIT', 'OMP_CLAUSE_ORDERED', 'OMP_CLAUSE_DEFAULT',
1      'OMP_CLAUSE_REDUCTION', 'OMP_CLAUSE_COLLAPSE', 'OMP_CLAUSE_UNTIED',
1      'OMP_CLAUSE_FINAL', and 'OMP_CLAUSE_MERGEABLE'.  Each code
1      represents the corresponding OpenMP clause.
1 
1      Clauses associated with the same directive are chained together via
1      'OMP_CLAUSE_CHAIN'.  Those clauses that accept a list of variables
1      are restricted to exactly one, accessed with 'OMP_CLAUSE_VAR'.
1      Therefore, multiple variables under the same clause 'C' need to be
1      represented as multiple 'C' clauses chained together.  This
1      facilitates adding new clauses during compilation.
1