FLANG

Public Types | Public Member Functions | List of all members
Fortran::lower::DoLoopHelper Class Reference

Helper to build fir.do_loop Ops. More...

`#include <flang/Lower/DoLoopHelper.h>`

## Public Types
using | BodyGenerator = std::function< void(FirOpBuilder &, mlir::Value)>
| Type of a callback to generate the loop body.

## Public Member Functions
| DoLoopHelper (FirOpBuilder &builder, mlir::Location loc)
| DoLoopHelper (const DoLoopHelper &)=delete
void | createLoop (mlir::Value lb, mlir::Value ub, mlir::Value step, const BodyGenerator &bodyGenerator)
void | createLoop (mlir::Value lb, mlir::Value ub, const BodyGenerator &bodyGenerator)
| Build loop [`lb`, `ub`] with step 1.
void | createLoop (mlir::Value count, const BodyGenerator &bodyGenerator)
| Build loop [0, `count`) with step 1.

## Detailed Description

Helper to build fir.do_loop Ops.

## Member Function Documentation

## ◆ createLoop()

void Fortran::lower::DoLoopHelper::createLoop | ( | mlir::Value | lb,
|  | mlir::Value | ub,
|  | mlir::Value | step,
|  | const BodyGenerator & | bodyGenerator
| ) |  |

Build loop [`lb`, `ub`] with step `step`. If `step` is an empty value, 1 is used for the step.

The documentation for this class was generated from the following files:

- include/flang/Lower/DoLoopHelper.h
- lib/Lower/DoLoopHelper.cpp