[PATCH] D84481: [flang][openacc] Handle optional end directive in combined construct

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 13:22:24 PDT 2020


clementval added inline comments.


================
Comment at: flang/lib/Semantics/canonicalize-acc.cpp:89
 
+  void RewriteOpenACCCombinedConstruct(parser::OpenACCCombinedConstruct &x,
+      parser::Block &block, parser::Block::iterator it) {
----------------
kiranchandramohan wrote:
> #just-asking: Is it possible to combine this with RewriteOpenACCLoopConstruct and the Canonicalisation for OpenMP loop?
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. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84481/new/

https://reviews.llvm.org/D84481



More information about the llvm-commits mailing list