Skip to content

Revert "[flang] Enable delayed localization by default for do concurrent (#144074)" #144476

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
Jun 17, 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
6 changes: 5 additions & 1 deletion flang/lib/Lower/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,11 @@ class FirConverter : public Fortran::lower::AbstractConverter {
fir::LocalitySpecifierOperands privateClauseOps;
auto doConcurrentLoopOp =
mlir::dyn_cast_if_present<fir::DoConcurrentLoopOp>(info.loopOp);
bool useDelayedPriv = enableDelayedPrivatization && doConcurrentLoopOp;
// TODO Promote to using `enableDelayedPrivatization` (which is enabled by
// default unlike the staging flag) once the implementation of this is more
// complete.
bool useDelayedPriv =
enableDelayedPrivatizationStaging && doConcurrentLoopOp;
llvm::SetVector<const Fortran::semantics::Symbol *> allPrivatizedSymbols;
llvm::SmallSet<const Fortran::semantics::Symbol *, 16> mightHaveReadHostSym;

Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/do_concurrent_delayed_locality.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s
! RUN: %flang_fc1 -emit-hlfir -mmlir --enable-delayed-privatization-staging=true -o - %s | FileCheck %s

subroutine do_concurrent_with_locality_specs
implicit none
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/do_concurrent_local_assoc_entity.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s
! RUN: %flang_fc1 -emit-hlfir -mmlir --enable-delayed-privatization-staging=true -o - %s | FileCheck %s

subroutine local_assoc
implicit none
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/do_concurrent_local_default_init.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test default initialization of DO CONCURRENT LOCAL() entities.
! RUN: bbc -emit-hlfir -I nowhere -o - %s | FileCheck %s
! RUN: bbc -emit-hlfir --enable-delayed-privatization-staging=true -I nowhere -o - %s | FileCheck %s

subroutine test_ptr(p)
interface
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/loops.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! RUN: bbc -emit-fir -hlfir=false --enable-delayed-privatization=false -o - %s | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false -o - %s | FileCheck %s

! CHECK-LABEL: loop_test
subroutine loop_test
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Lower/loops3.f90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Test do concurrent reduction
! RUN: bbc -emit-fir -hlfir=false --enable-delayed-privatization=false -o - %s | FileCheck %s
! RUN: bbc -emit-fir -hlfir=false -o - %s | FileCheck %s

! CHECK-LABEL: loop_test
subroutine loop_test
Expand Down
Loading