Expand description
scf
dialect.
The scf
(structured control flow) dialect contains operations that
represent control flow constructs such as if
and for
. Being
structured means that the control flow has a structure unlike, for
example, goto
s or assert
s. Unstructured control flow operations are
located in the cf
(control flow) dialect.
Originally, this dialect was developed as a common lowering stage for the
affine
and linalg
dialects. Both convert to SCF loops instead of
targeting branch-based CFGs directly. Typically, scf
is lowered to cf
and then lowered to some final target like LLVM or SPIR-V.
Structs§
- A
condition
operation. Loop continuation condition. - A builder for a
condition
operation. - An
execute_region
operation. Operation that executes its region exactly once. - A builder for an
execute_region
operation. - A
for
operation. For operation. - A builder for a
for
operation. - A
forall
operation. Evaluate a block multiple times in parallel. - A builder for a
forall
operation. - An
if
operation. If-then-else operation. - A builder for an
if
operation. - A
forall.in_parallel
operation. Terminates aforall
block. - A builder for a
forall.in_parallel
operation. - An
index_switch
operation. Switch-case operation on an index argument. - A builder for an
index_switch
operation. - A
parallel
operation. Parallel for operation. - A builder for a
parallel
operation. - A
reduce
operation. Reduce operation for scf.parallel. - A builder for a
reduce
operation. - A
reduce.return
operation. Terminator for reduce operation. - A builder for a
reduce.return
operation. - A
while
operation. A generic ‘while’ loop. - A builder for a
while
operation. - A
yield
operation. Loop yield and termination operation. - A builder for a
yield
operation.
Functions§
- Creates a
condition
operation. - Creates an
execute_region
operation. - Creates a
for
operation. - Creates a
forall
operation. - Creates a
forall.in_parallel
operation. - Creates an
if
operation. - Creates an
index_switch
operation. - Creates a
parallel
operation. - Creates a
reduce
operation. - Creates a
reduce.return
operation. - Creates a
while
operation. - Creates a
yield
operation.