Multi-Level IR Compiler Framework

'omp' Dialect

Operation definition 

omp.barrier (::mlir::omp::BarrierOp) 

barrier construct


operation ::= `omp.barrier` attr-dict

The barrier construct specifies an explicit barrier at the point at which the construct appears.

omp.flush (::mlir::omp::FlushOp) 

flush construct


operation ::= `omp.flush` attr-dict ($varList^ `:` type($varList))?

The flush construct executes the OpenMP flush operation. This operation makes a thread’s temporary view of memory consistent with memory and enforces an order on the memory operations of the variables explicitly specified or implied.


varListany type

omp.master (::mlir::omp::MasterOp) 

master construct

The master construct specifies a structured block that is executed by the master thread of the team.

omp.parallel (::mlir::omp::ParallelOp) 

parallel construct

The parallel construct includes a region of code which is to be executed by a team of threads.

The optional $if_expr_var parameter specifies a boolean result of a conditional check. If this value is 1 or is not provided then the parallel region runs as normal, if it is 0 then the parallel region is executed with one thread.

The optional $num_threads_var parameter specifies the number of threads which should be used to execute the parallel region.

The optional $default_val attribute specifies the default data sharing attribute of variables used in the parallel region that are not passed explicitly as parameters to the operation.

The $private_vars, $firstprivate_vars, $shared_vars and $copyin_vars parameters are a variadic list of variables that specify the data sharing attribute of those variables.

The optional $proc_bind_val attribute controls the thread affinity for the execution of the parallel region.


AttributeMLIR TypeDescription
default_val::mlir::StringAttrdefault clause
proc_bind_val::mlir::StringAttrProcBindKind Clause


if_expr_varany type
num_threads_varany type
private_varsany type
firstprivate_varsany type
shared_varsany type
copyin_varsany type

omp.taskwait (::mlir::omp::TaskwaitOp) 

taskwait construct


operation ::= `omp.taskwait` attr-dict

The taskwait construct specifies a wait on the completion of child tasks of the current task.

omp.taskyield (::mlir::omp::TaskyieldOp) 

taskyield construct


operation ::= `omp.taskyield` attr-dict

The taskyield construct specifies that the current task can be suspended in favor of execution of a different task.

omp.terminator (::mlir::omp::TerminatorOp) 

terminator for OpenMP regions


operation ::= `omp.terminator` attr-dict

A terminator operation for regions that appear in the body of OpenMP operation. These regions are not expected to return any value so the terminator takes no operands. The terminator op returns control to the enclosing op.