[PATCH] D90697: [Flang][OpenMP 4.5] Add semantic check for OpenMP Reduction Clause
Yashaswini Hegde via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 27 23:13:38 PST 2021
yhegde marked an inline comment as done.
yhegde added inline comments.
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:349
+ CheckMultipleAppearances(
+ *name, *name->symbol, Symbol::Flag::OmpReduction);
+ }
----------------
yhegde wrote:
> kiranchandramohan wrote:
> > yhegde wrote:
> > > kiranchandramohan wrote:
> > > > yhegde wrote:
> > > > > kiranchandramohan wrote:
> > > > > > Where was the symbol created for these names?
> > > > > Not sure I understood this question. I think here symbols are created with IntrinsicOperators.
> > > > I saw symbols created for the reduction operation above but not for the variable.
> > > The symbols were not created for ProcedureDesignator. So they were created here. And I think all other symbols associated with reduction are created along with IntrinsicOperators .
> > OK. Is there a test_symbols.sh test which checks for the symbol for non-Intrinsic reduction?
> I suppose , you mean the following test cases ?
>
> !$omp do reduction(-:k) reduction(*:j) reduction(-:l)
> !DEF: /omp_reduction/Block7/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
> do i=1,10
> !REF: /omp_reduction/k
> k = k+1
> end do
> !$omp end do
>
>
> !$omp do reduction(.and.:k) reduction(.or.:j) reduction(.eqv.:l)
> !DEF: /omp_reduction/Block8/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
> do i=1,10
> !REF: /omp_reduction/k
> k = k+1
> end do
> !$omp end do
>
> I can add them.
Or if the cases similar to the following case are, those under consideration ,
program red
!$omp sections reduction(&:k) reduction(#:j)
do i = 1, 10
k = k + 1
end do
!$omp end sections
end program red
then the test_symbols.sh is catching them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90697/new/
https://reviews.llvm.org/D90697
More information about the llvm-commits
mailing list