[clang] [flang] [llvm] seq_cst is allowed in Flush since OpenMP 5.1. (PR #114072)

Kiran Chandramohan via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 21 05:26:00 PST 2024


kiranchandramohan wrote:

> > > > Thanks for this patch. Could you update the title/summary of the patch to say that seq_cst is allowed in Flush since OpenMP 5.1. Also, might make sense to say why no other changes in Lowering to IR is required.
> > > > Could you add a test in flang/test/Lower/OpenMP/flush.f90 also for the Flang lowering?
> > > 
> > > 
> > > @kiranchandramohan Thanks for the comment! I noticed this test doesn't cover other flush clauses like acq_rel, acquire or release. Do you think we need to add seq_cst specifically?
> > 
> > 
> > Yes, I think that would be good to do.
> 
> Flang currently does not support any other clauses of the flush directive, including seq_cst, so this functionality is not supported at the moment by flang.

Could you add a test like the following?
`flang/test/Lower/OpenMP/Todo/flush-seq-cst.f90`
```
! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s -fopenmp-version=51 2>&1 | FileCheck %s

! CHECK: not yet implemented: Unhandled clause SEQ_CST in FLUSH construct
program flush_seq_cst
  !$omp flush seq_cst
end program
```

https://github.com/llvm/llvm-project/pull/114072


More information about the cfe-commits mailing list