12
12
// DoLoopHelper implementation
13
13
// ===----------------------------------------------------------------------===//
14
14
15
- fir::DoLoopOp fir::factory::DoLoopHelper::createLoop (
16
- mlir::Value lb, mlir::Value ub, mlir::Value step,
17
- const BodyGenerator &bodyGenerator) {
15
+ fir::DoLoopOp
16
+ fir::factory::DoLoopHelper::createLoop (mlir::Value lb, mlir::Value ub,
17
+ mlir::Value step,
18
+ const BodyGenerator &bodyGenerator) {
18
19
auto lbi = builder.convertToIndexType (loc, lb);
19
20
auto ubi = builder.convertToIndexType (loc, ub);
20
21
assert (step && " step must be an actual Value" );
@@ -28,15 +29,17 @@ fir::DoLoopOp fir::factory::DoLoopHelper::createLoop(
28
29
return loop;
29
30
}
30
31
31
- fir::DoLoopOp fir::factory::DoLoopHelper::createLoop (
32
- mlir::Value lb, mlir::Value ub, const BodyGenerator &bodyGenerator) {
33
- return createLoop (lb, ub,
34
- builder.createIntegerConstant (loc, builder.getIndexType (), 1 ),
35
- bodyGenerator);
32
+ fir::DoLoopOp
33
+ fir::factory::DoLoopHelper::createLoop (mlir::Value lb, mlir::Value ub,
34
+ const BodyGenerator &bodyGenerator) {
35
+ return createLoop (
36
+ lb, ub, builder.createIntegerConstant (loc, builder.getIndexType (), 1 ),
37
+ bodyGenerator);
36
38
}
37
39
38
- fir::DoLoopOp fir::factory::DoLoopHelper::createLoop (
39
- mlir::Value count, const BodyGenerator &bodyGenerator) {
40
+ fir::DoLoopOp
41
+ fir::factory::DoLoopHelper::createLoop (mlir::Value count,
42
+ const BodyGenerator &bodyGenerator) {
40
43
auto indexType = builder.getIndexType ();
41
44
auto zero = builder.createIntegerConstant (loc, indexType, 0 );
42
45
auto one = builder.createIntegerConstant (loc, count.getType (), 1 );
0 commit comments