[PATCH] D102180: [Clang][OpenMP] Emit dependent PreInits before directive.

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 10 10:09:14 PDT 2021


Meinersbur created this revision.
Meinersbur added a reviewer: ABataev.
Meinersbur added projects: OpenMP, clang.
Herald added subscribers: guansong, yaxunl.
Meinersbur requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

The PreInits of a loop transformation (atm moment only tile) include the computation of the trip count. The trip count is needed by any loop-associated directives that consumes the transformation-generated loop. Hence, we must ensure that the PreInits of consumed loop transformations are emitted with the consuming directive.

This is done by addinging the inner loop transformation's PreInits to the outer loop-directive's PreInits. The outer loop-directive will consume the de-sugared AST such that the inner PreInits are not emitted twice. The PreInits of a loop transformation are still emitted directly if its generated loop(s) are not associated with another loop-associated directive.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102180

Files:
  clang/include/clang/AST/StmtOpenMP.h
  clang/lib/AST/StmtOpenMP.cpp
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/tile_codegen.cpp
  clang/test/OpenMP/tile_codegen_for_dependent.cpp
  clang/test/OpenMP/tile_codegen_for_multiple.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102180.344096.patch
Type: text/x-patch
Size: 37031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210510/d6181cdf/attachment-0001.bin>


More information about the cfe-commits mailing list