Skip to content

Commit

Permalink
More renaming after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
skatrak committed Mar 20, 2024
1 parent e13d242 commit 16ebc0c
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def CFGConversionOnFunc : CFGConversionBase<"func", "mlir::func::FuncOp"> {
let constructor = "::fir::createFirToCfgOnFuncPass()";
}

def CFGConversionOnReduction : CFGConversionBase<"reduce", "mlir::omp::ReductionDeclareOp"> {
def CFGConversionOnReduction : CFGConversionBase<"reduce", "mlir::omp::DeclareReductionOp"> {
let constructor = "::fir::createFirToCfgOnReductionPass()";
}

Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Tools/CLOptions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static void addCanonicalizerPassWithoutRegionSimplification(
inline void addCfgConversionPass(mlir::PassManager &pm) {
addNestedPassConditionally<mlir::func::FuncOp>(
pm, disableCfgConversion, fir::createFirToCfgOnFuncPass);
addNestedPassConditionally<mlir::omp::ReductionDeclareOp>(
addNestedPassConditionally<mlir::omp::DeclareReductionOp>(
pm, disableCfgConversion, fir::createFirToCfgOnReductionPass);
}

Expand Down
4 changes: 2 additions & 2 deletions flang/test/Driver/bbc-mlir-pass-pipeline.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
! CHECK-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
! CHECK-NEXT: (S) 0 num-dce'd - Number of operations DCE'd

! CHECK-NEXT: Pipeline Collection : ['func.func', 'omp.reduction.declare']
! CHECK-NEXT: Pipeline Collection : ['func.func', 'omp.declare_reduction']
! CHECK-NEXT: 'func.func' Pipeline
! CHECK-NEXT: PolymorphicOpConversion
! CHECK-NEXT: CFGConversionOnFunc
! CHECK-NEXT: 'omp.reduction.declare' Pipeline
! CHECK-NEXT: 'omp.declare_reduction' Pipeline
! CHECK-NEXT: CFGConversionOnReduction

! CHECK-NEXT: SCFToControlFlow
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Driver/mlir-debug-pass-pipeline.f90
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
! ALL-NEXT: (S) 0 num-cse'd - Number of operations CSE'd
! ALL-NEXT: (S) 0 num-dce'd - Number of operations DCE'd

! ALL-NEXT: Pipeline Collection : ['func.func', 'omp.reduction.declare']
! ALL-NEXT: Pipeline Collection : ['func.func', 'omp.declare_reduction']
! ALL-NEXT: 'func.func' Pipeline
! ALL-NEXT: PolymorphicOpConversion
! ALL-NEXT: CFGConversionOnFunc
! ALL-NEXT: 'omp.reduction.declare' Pipeline
! ALL-NEXT: 'omp.declare_reduction' Pipeline
! ALL-NEXT: CFGConversionOnReduction
! ALL-NEXT: SCFToControlFlow
! ALL-NEXT: Canonicalizer
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Driver/mlir-pass-pipeline.f90
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
! O2-NEXT: 'func.func' Pipeline
! O2-NEXT: PolymorphicOpConversion
! O2-NEXT: AddAliasTags
! ALL-NEXT: Pipeline Collection : ['func.func', 'omp.reduction.declare']
! ALL-NEXT: Pipeline Collection : ['func.func', 'omp.declare_reduction']
! ALL-NEXT: 'func.func' Pipeline
! NOTO2-NEXT: PolymorphicOpConversion
! ALL-NEXT: CFGConversionOnFunc
! ALL-NEXT: 'omp.reduction.declare' Pipeline
! ALL-NEXT: 'omp.declare_reduction' Pipeline
! ALL-NEXT: CFGConversionOnReduction

! ALL-NEXT: SCFToControlFlow
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Fir/basic-program.fir
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ func.func @_QQmain() {

// PASSES-NEXT: AddAliasTags

// PASSES-NEXT: Pipeline Collection : ['func.func', 'omp.reduction.declare']
// PASSES-NEXT: Pipeline Collection : ['func.func', 'omp.declare_reduction']
// PASSES-NEXT: 'func.func' Pipeline
// PASSES-NEXT: CFGConversionOnFunc
// PASSES-NEXT: 'omp.reduction.declare' Pipeline
// PASSES-NEXT: 'omp.declare_reduction' Pipeline
// PASSES-NEXT: CFGConversionOnReduction

// PASSES-NEXT: SCFToControlFlow
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/parallel-reduction-array.f90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ program reduce
print *,i
end program

! CHECK-LABEL: omp.reduction.declare @add_reduction_i_32_box_3_byref : !fir.ref<!fir.box<!fir.array<3xi32>>> init {
! CHECK-LABEL: omp.declare_reduction @add_reduction_i_32_box_3_byref : !fir.ref<!fir.box<!fir.array<3xi32>>> init {
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.ref<!fir.box<!fir.array<3xi32>>>):
! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.array<3xi32> {bindc_name = ".tmp"}
! CHECK: %[[VAL_2:.*]] = arith.constant 0 : i32
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/parallel-reduction-array2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ program reduce
print *,i
end program

! CHECK-LABEL: omp.reduction.declare @add_reduction_i_32_box_3_byref : !fir.ref<!fir.box<!fir.array<3xi32>>> init {
! CHECK-LABEL: omp.declare_reduction @add_reduction_i_32_box_3_byref : !fir.ref<!fir.box<!fir.array<3xi32>>> init {
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.ref<!fir.box<!fir.array<3xi32>>>):
! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.array<3xi32> {bindc_name = ".tmp"}
! CHECK: %[[VAL_2:.*]] = arith.constant 0 : i32
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/wsloop-reduction-array.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ program reduce
print *,r
end program

! CHECK-LABEL omp.reduction.declare @add_reduction_i_32_box_2_byref : !fir.ref<!fir.box<!fir.array<2xi32>>> init {
! CHECK-LABEL omp.declare_reduction @add_reduction_i_32_box_2_byref : !fir.ref<!fir.box<!fir.array<2xi32>>> init {
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.ref<!fir.box<!fir.array<2xi32>>>):
! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.array<2xi32> {bindc_name = ".tmp"}
! CHECK: %[[VAL_2:.*]] = arith.constant 0 : i32
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/wsloop-reduction-array2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ program reduce
print *,r
end program

! CHECK-LABEL omp.reduction.declare @add_reduction_i_32_box_2_byref : !fir.ref<!fir.box<!fir.array<2xi32>>> init {
! CHECK-LABEL omp.declare_reduction @add_reduction_i_32_box_2_byref : !fir.ref<!fir.box<!fir.array<2xi32>>> init {
! CHECK: ^bb0(%[[VAL_0:.*]]: !fir.ref<!fir.box<!fir.array<2xi32>>>):
! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.array<2xi32> {bindc_name = ".tmp"}
! CHECK: %[[VAL_2:.*]] = arith.constant 0 : i32
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Transforms/omp-reduction-cfg-conversion.fir
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: fir-opt --cfg-conversion-on-reduce-opt %s | FileCheck %s

omp.reduction.declare @add_reduction_i_32_box_3_byref : !fir.ref<!fir.box<!fir.array<3xi32>>> init {
omp.declare_reduction @add_reduction_i_32_box_3_byref : !fir.ref<!fir.box<!fir.array<3xi32>>> init {
^bb0(%arg0: !fir.ref<!fir.box<!fir.array<3xi32>>>):
%c4_i32 = arith.constant 4 : i32
%c0_i32 = arith.constant 0 : i32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3170,7 +3170,7 @@ LogicalResult OpenMPDialectLLVMIRTranslationInterface::convertOperation(
omp::CriticalDeclareOp>([](auto op) {
// `yield` and `terminator` can be just omitted. The block structure
// was created in the region that handles their parent operation.
// `reduction.declare` will be used by reductions and is not
// `declare_reduction` will be used by reductions and is not
// converted directly, skip it.
// `critical.declare` is only used to declare names of critical
// sections which will be used by `critical` ops and hence can be
Expand Down
2 changes: 1 addition & 1 deletion mlir/test/Target/LLVMIR/openmp-reduction-call.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Test that we don't crash when there is a call operation in the combiner

omp.reduction.declare @add_f32 : f32
omp.declare_reduction @add_f32 : f32
init {
^bb0(%arg: f32):
%0 = llvm.mlir.constant(0.0 : f32) : f32
Expand Down

0 comments on commit 16ebc0c

Please sign in to comment.