OpenACC combined construct can have an optional end directive. This patch handle this
case in the parsing/unparsing with a canonicalization step. Unlike OmpEndLoopDirective,
this doesn't need a special treatment in the pre-fir tree as there is no clause attached to
a AccEndCombinedDirective.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Semantics/canonicalize-acc.cpp | ||
---|---|---|
89 | #just-asking: Is it possible to combine this with RewriteOpenACCLoopConstruct and the Canonicalisation for OpenMP loop? |
flang/lib/Semantics/canonicalize-acc.cpp | ||
---|---|---|
89 | I guess if we start at a higher level of construct like OpenACCConstruct we can merge the loop and combined construct rewrite. To reduce the code duplication between canonicalization we can extract the rewriting code in a templated function but I'm assuming we still need the rewrite functions to call the templated function then. I'll try to have a look at it this week-end if I find time. Always good if we can reduce the amount of code that is duplicated. |
flang/lib/Parser/program-parsers.cpp | ||
---|---|---|
79–82 | Can an OpenACC end directive really be the first statement in the executable part? |
flang/lib/Parser/program-parsers.cpp | ||
---|---|---|
79–82 | Only if the user makes a big mistake. I guess same with ompEndLoopDirective. I'm fine to remove it. It was to do as omp loop was done. |
Can an OpenACC end directive really be the first statement in the executable part?