Skip to content

Commit f6ae92c

Browse files
committed
Standardise on returning the concrete op type
1 parent f842579 commit f6ae92c

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ static mlir::omp::LoopNestOp genLoopNestOp(
19131913
queue, item, clauseOps);
19141914
}
19151915

1916-
static mlir::Operation *
1916+
static mlir::omp::LoopOp
19171917
genLoopOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
19181918
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
19191919
mlir::Location loc, const ConstructQueue &queue,
@@ -2540,7 +2540,7 @@ genTeamsOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
25402540
// also be a leaf of a composite construct
25412541
//===----------------------------------------------------------------------===//
25422542

2543-
static mlir::Operation *genStandaloneDistribute(
2543+
static mlir::omp::DistributeOp genStandaloneDistribute(
25442544
lower::AbstractConverter &converter, lower::SymMap &symTable,
25452545
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
25462546
lower::pft::Evaluation &eval, mlir::Location loc,
@@ -2571,7 +2571,7 @@ static mlir::Operation *genStandaloneDistribute(
25712571
return distributeOp;
25722572
}
25732573

2574-
static mlir::Operation *genStandaloneDo(
2574+
static mlir::omp::WsloopOp genStandaloneDo(
25752575
lower::AbstractConverter &converter, lower::SymMap &symTable,
25762576
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
25772577
lower::pft::Evaluation &eval, mlir::Location loc,
@@ -2605,7 +2605,7 @@ static mlir::Operation *genStandaloneDo(
26052605
return wsloopOp;
26062606
}
26072607

2608-
static mlir::Operation *genStandaloneParallel(
2608+
static mlir::omp::ParallelOp genStandaloneParallel(
26092609
lower::AbstractConverter &converter, lower::SymMap &symTable,
26102610
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
26112611
lower::pft::Evaluation &eval, mlir::Location loc,
@@ -2634,13 +2634,12 @@ static mlir::Operation *genStandaloneParallel(
26342634
enableDelayedPrivatization ? &dsp.value() : nullptr);
26352635
}
26362636

2637-
static mlir::Operation *genStandaloneSimd(lower::AbstractConverter &converter,
2638-
lower::SymMap &symTable,
2639-
semantics::SemanticsContext &semaCtx,
2640-
lower::pft::Evaluation &eval,
2641-
mlir::Location loc,
2642-
const ConstructQueue &queue,
2643-
ConstructQueue::const_iterator item) {
2637+
static mlir::omp::SimdOp
2638+
genStandaloneSimd(lower::AbstractConverter &converter, lower::SymMap &symTable,
2639+
semantics::SemanticsContext &semaCtx,
2640+
lower::pft::Evaluation &eval, mlir::Location loc,
2641+
const ConstructQueue &queue,
2642+
ConstructQueue::const_iterator item) {
26442643
mlir::omp::SimdOperands simdClauseOps;
26452644
llvm::SmallVector<const semantics::Symbol *> simdReductionSyms;
26462645
genSimdClauses(converter, semaCtx, item->clauses, loc, simdClauseOps,
@@ -2670,7 +2669,7 @@ static mlir::Operation *genStandaloneSimd(lower::AbstractConverter &converter,
26702669
return simdOp;
26712670
}
26722671

2673-
static mlir::Operation *genStandaloneTaskloop(
2672+
static mlir::omp::TaskloopOp genStandaloneTaskloop(
26742673
lower::AbstractConverter &converter, lower::SymMap &symTable,
26752674
semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
26762675
mlir::Location loc, const ConstructQueue &queue,
@@ -2683,7 +2682,7 @@ static mlir::Operation *genStandaloneTaskloop(
26832682
// Code generation functions for composite constructs
26842683
//===----------------------------------------------------------------------===//
26852684

2686-
static mlir::Operation *genCompositeDistributeParallelDo(
2685+
static mlir::omp::DistributeOp genCompositeDistributeParallelDo(
26872686
lower::AbstractConverter &converter, lower::SymMap &symTable,
26882687
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
26892688
lower::pft::Evaluation &eval, mlir::Location loc,
@@ -2749,7 +2748,7 @@ static mlir::Operation *genCompositeDistributeParallelDo(
27492748
return distributeOp;
27502749
}
27512750

2752-
static mlir::Operation *genCompositeDistributeParallelDoSimd(
2751+
static mlir::omp::DistributeOp genCompositeDistributeParallelDoSimd(
27532752
lower::AbstractConverter &converter, lower::SymMap &symTable,
27542753
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
27552754
lower::pft::Evaluation &eval, mlir::Location loc,
@@ -2840,7 +2839,7 @@ static mlir::Operation *genCompositeDistributeParallelDoSimd(
28402839
return distributeOp;
28412840
}
28422841

2843-
static mlir::Operation *genCompositeDistributeSimd(
2842+
static mlir::omp::DistributeOp genCompositeDistributeSimd(
28442843
lower::AbstractConverter &converter, lower::SymMap &symTable,
28452844
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
28462845
lower::pft::Evaluation &eval, mlir::Location loc,
@@ -2894,7 +2893,7 @@ static mlir::Operation *genCompositeDistributeSimd(
28942893
return distributeOp;
28952894
}
28962895

2897-
static mlir::Operation *genCompositeDoSimd(
2896+
static mlir::omp::WsloopOp genCompositeDoSimd(
28982897
lower::AbstractConverter &converter, lower::SymMap &symTable,
28992898
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
29002899
lower::pft::Evaluation &eval, mlir::Location loc,
@@ -2951,7 +2950,7 @@ static mlir::Operation *genCompositeDoSimd(
29512950
return wsloopOp;
29522951
}
29532952

2954-
static mlir::Operation *genCompositeTaskloopSimd(
2953+
static mlir::omp::TaskloopOp genCompositeTaskloopSimd(
29552954
lower::AbstractConverter &converter, lower::SymMap &symTable,
29562955
lower::StatementContext &stmtCtx, semantics::SemanticsContext &semaCtx,
29572956
lower::pft::Evaluation &eval, mlir::Location loc,

0 commit comments

Comments
 (0)