Skip to content

[flang] Generlize names of delayed privatization CLI flags #138816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions flang/include/flang/Support/Flags.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//===-- include/flang/Support/Flags.h ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef FORTRAN_SUPPORT_FLAGS_H_
#define FORTRAN_SUPPORT_FLAGS_H_

#include "llvm/Support/CommandLine.h"

extern llvm::cl::opt<bool> enableDelayedPrivatization;
extern llvm::cl::opt<bool> enableDelayedPrivatizationStaging;

#endif // FORTRAN_SUPPORT_FLAGS_H_
2 changes: 1 addition & 1 deletion flang/lib/Lower/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "flang/Lower/Bridge.h"

#include "OpenMP/DataSharingProcessor.h"
#include "OpenMP/Utils.h"
#include "flang/Lower/Allocatable.h"
#include "flang/Lower/CallInterface.h"
#include "flang/Lower/Coarray.h"
Expand Down Expand Up @@ -63,6 +62,7 @@
#include "flang/Semantics/runtime-type-info.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Flags.h"
#include "flang/Support/Version.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/IR/BuiltinAttributes.h"
Expand Down
1 change: 1 addition & 0 deletions flang/lib/Lower/OpenMP/OpenMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/openmp-directive-sets.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Flags.h"
#include "flang/Support/OpenMP-utils.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
Expand Down
12 changes: 0 additions & 12 deletions flang/lib/Lower/OpenMP/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ llvm::cl::opt<bool> treatIndexAsSection(
llvm::cl::desc("In the OpenMP data clauses treat `a(N)` as `a(N:N)`."),
llvm::cl::init(true));

llvm::cl::opt<bool> enableDelayedPrivatization(
"openmp-enable-delayed-privatization",
llvm::cl::desc(
"Emit `[first]private` variables as clauses on the MLIR ops."),
llvm::cl::init(true));

llvm::cl::opt<bool> enableDelayedPrivatizationStaging(
"openmp-enable-delayed-privatization-staging",
llvm::cl::desc("For partially supported constructs, emit `[first]private` "
"variables as clauses on the MLIR ops."),
llvm::cl::init(false));

namespace Fortran {
namespace lower {
namespace omp {
Expand Down
2 changes: 0 additions & 2 deletions flang/lib/Lower/OpenMP/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include <cstdint>

extern llvm::cl::opt<bool> treatIndexAsSection;
extern llvm::cl::opt<bool> enableDelayedPrivatization;
extern llvm::cl::opt<bool> enableDelayedPrivatizationStaging;

namespace fir {
class FirOpBuilder;
Expand Down
1 change: 1 addition & 0 deletions flang/lib/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ endif()

add_flang_library(FortranSupport
default-kinds.cpp
Flags.cpp
Fortran.cpp
Fortran-features.cpp
idioms.cpp
Expand Down
20 changes: 20 additions & 0 deletions flang/lib/Support/Flags.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//===-- lib/Support/Flags.cpp ---------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "flang/Support/Flags.h"

llvm::cl::opt<bool> enableDelayedPrivatization("enable-delayed-privatization",
llvm::cl::desc(
"Emit private/local variables as clauses/specifiers on MLIR ops."),
llvm::cl::init(true));

llvm::cl::opt<bool> enableDelayedPrivatizationStaging(
"enable-delayed-privatization-staging",
llvm::cl::desc("For partially supported constructs, emit private/local "
"variables as clauses/specifiers on MLIR ops."),
llvm::cl::init(false));
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization-staging \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization-staging \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine standalone_distribute
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Lower/OpenMP/DelayedPrivatization/equivalence.f90
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for variables that are storage associated via `EQUIVALENCE`.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine private_common
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Tests delayed privatization for `targets ... private(..)` for allocatables.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization-staging \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization-staging \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine target_allocatable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Tests delayed privatization for `targets ... private(..)` for allocatables.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization-staging \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization-staging \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine target_allocatable(lb, ub, l)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Tests delayed privatization for `targets ... private(..)` for simple variables.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization-staging \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization-staging \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization-staging -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine target_simple
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Lower/OpenMP/allocatable-multiple-vars.f90
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
! Test early privatization for multiple allocatable variables.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization=false \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization=false \
! RUN: -o - %s 2>&1 | FileCheck %s

! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization=false -o - %s 2>&1 |\
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization=false -o - %s 2>&1 |\
! RUN: FileCheck %s

subroutine delayed_privatization_allocatable
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/cfg-conversion-omp.private.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

! RUN: split-file %s %t && cd %t

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - test.f90 2>&1 | \
! RUN: fir-opt --cfg-conversion -o test.cfg-conv.mlir
! RUN: FileCheck --input-file=test.cfg-conv.mlir %s --check-prefix="CFGConv"
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/debug_info_conflict.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Tests that there no debug-info conflicts arise because of DI attached to nested
! OMP regions arguments.

! RUN: %flang -c -fopenmp -g -mmlir --openmp-enable-delayed-privatization=true \
! RUN: %flang -c -fopenmp -g -mmlir --enable-delayed-privatization=true \
! RUN: %s -o - 2>&1 | FileCheck %s

subroutine bar (b)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for allocatable arrays.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 |\
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 |\
! RUN: FileCheck %s

subroutine delayed_privatization_private(var1, l1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

! RUN: split-file %s %t

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/test_ir.f90 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %t/test_ir.f90 2>&1 |\
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %t/test_ir.f90 2>&1 |\
! RUN: FileCheck %s

!--- test_ir.f90
Expand Down Expand Up @@ -38,7 +38,7 @@ subroutine delayed_privatization_allocatable
! CHECK-NEXT: hlfir.assign %[[ORIG_BASE_LD]] to %[[PRIV_PRIV_ARG]] realloc
! CHECK-NEXT: }

! RUN: %flang -c -emit-llvm -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang -c -emit-llvm -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/test_compilation_to_obj.f90 | \
! RUN: llvm-dis 2>&1 |\
! RUN: FileCheck %s -check-prefix=LLVM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for allocatables: `private`.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 |\
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 |\
! RUN: FileCheck %s

subroutine delayed_privatization_allocatable
Expand Down
12 changes: 6 additions & 6 deletions flang/test/Lower/OpenMP/delayed-privatization-array.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

! RUN: split-file %s %t

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/one_dim_array.f90 2>&1 | FileCheck %s --check-prefix=ONE_DIM
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - \
! RUN: %t/one_dim_array.f90 2>&1 | FileCheck %s --check-prefix=ONE_DIM

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/two_dim_array.f90 2>&1 | FileCheck %s --check-prefix=TWO_DIM
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - \
! RUN: %t/two_dim_array.f90 2>&1 | FileCheck %s --check-prefix=TWO_DIM

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/one_dim_array_default_lb.f90 2>&1 | FileCheck %s --check-prefix=ONE_DIM_DEFAULT_LB
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - \
! RUN: %t/one_dim_array_default_lb.f90 2>&1 | FileCheck %s --check-prefix=ONE_DIM_DEFAULT_LB

!--- one_dim_array.f90
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

! RUN: split-file %s %t

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/static_len.f90 2>&1 | FileCheck %s --check-prefix=STATIC_LEN
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %t/static_len.f90 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %t/static_len.f90 2>&1 \
! RUN: | FileCheck %s --check-prefix=STATIC_LEN

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/dyn_len.f90 2>&1 | FileCheck %s --check-prefix=DYN_LEN
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %t/dyn_len.f90 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %t/dyn_len.f90 2>&1 \
! RUN: | FileCheck %s --check-prefix=DYN_LEN

!--- static_len.f90
Expand Down
8 changes: 4 additions & 4 deletions flang/test/Lower/OpenMP/delayed-privatization-character.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

! RUN: split-file %s %t

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/dyn_len.f90 2>&1 | FileCheck %s --check-prefix=DYN_LEN
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %t/dyn_len.f90 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %t/dyn_len.f90 2>&1 \
! RUN: | FileCheck %s --check-prefix=DYN_LEN

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %t/static_len.f90 2>&1 | FileCheck %s --check-prefix=STATIC_LEN
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %t/static_len.f90 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %t/static_len.f90 2>&1 \
! RUN: | FileCheck %s --check-prefix=STATIC_LEN

!--- dyn_len.f90
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for derived types with default initialization.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 |\
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 |\
! RUN: FileCheck %s

subroutine delayed_privatization_default_init
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for the `firstprivate` clause.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine delayed_privatization_firstprivate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! Tests the OMPIRBuilder can handle multiple privatization regions that contain
! multiple BBs (for example, for allocatables).

! RUN: %flang -S -emit-llvm -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang -S -emit-llvm -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s

subroutine foo(x)
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Lower/OpenMP/delayed-privatization-pointer.f90
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for pointers: `private`.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 |\
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 |\
! RUN: FileCheck %s

subroutine delayed_privatization_pointer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for both `private` and `firstprivate` clauses.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine delayed_privatization_private_firstprivate
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Lower/OpenMP/delayed-privatization-private.f90
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Test delayed privatization for the `private` clause.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine delayed_privatization_private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
! that the block arguments are added in the proper order (reductions first and
! then delayed privatization.

! RUN: bbc -emit-hlfir -fopenmp --force-byref-reduction --openmp-enable-delayed-privatization -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --force-byref-reduction --enable-delayed-privatization -o - %s 2>&1 | FileCheck %s

subroutine red_and_delayed_private
integer :: red
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Lower/OpenMP/delayed-privatization-reduction.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
! that the block arguments are added in the proper order (reductions first and
! then delayed privatization.

! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization \
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization \
! RUN: -o - %s 2>&1 | FileCheck %s
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization -o - %s 2>&1 \
! RUN: bbc -emit-hlfir -fopenmp --enable-delayed-privatization -o - %s 2>&1 \
! RUN: | FileCheck %s

subroutine red_and_delayed_private
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: %flang_fc1 -fopenmp -mmlir --openmp-enable-delayed-privatization-staging=true -emit-hlfir %s -o - | FileCheck %s
! RUN: %flang_fc1 -fopenmp -mmlir --enable-delayed-privatization-staging=true -emit-hlfir %s -o - | FileCheck %s

subroutine first_and_lastprivate(var)
integer i
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/firstprivate-commonblock.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: %flang_fc1 -emit-hlfir -fopenmp \
! RUN: -mmlir --openmp-enable-delayed-privatization=true -o - %s 2>&1 \
! RUN: -mmlir --enable-delayed-privatization=true -o - %s 2>&1 \
! RUN: | FileCheck %s

!CHECK: func.func @_QPfirstprivate_common() {
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/OpenMP/private-commonblock.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! RUN: %flang_fc1 -emit-hlfir -fopenmp \
! RUN: -mmlir --openmp-enable-delayed-privatization=true -o - %s 2>&1 \
! RUN: -mmlir --enable-delayed-privatization=true -o - %s 2>&1 \
! RUN: | FileCheck %s

!CHECK: func.func @_QPprivate_common() {
Expand Down
Loading