RE: [PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-03-19 Thread Narayanaswamy, Ravi via cfe-commits
If it Is not updated can you update the OpenMP feature tracking doc. 
https://clang.llvm.org/docs/OpenMPSupport.html
Thanks
Ravi

-Original Message-
From: Michael Kruse via Phabricator  
Sent: Tuesday, March 17, 2020 8:34 PM
To: a.bat...@hotmail.com; jdoerf...@anl.gov; hfin...@anl.gov; Wilmarth, Terry L 
; Bae, Hansang ; 
protze.joac...@gmail.com; Churbanov, Andrey ; 
Narayanaswamy, Ravi ; 
jonathanchesterfi...@gmail.com; Rokos, Georgios 
Cc: jholewin...@nvidia.com; zhang.guans...@gmail.com; arpha...@gmail.com; 
cfe-commits@lists.llvm.org; p8u8i7l5t1q9r...@ibm-systems-z.slack.com; 
1.in...@gmail.com
Subject: [PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

Meinersbur created this revision.
Meinersbur added reviewers: ABataev, jdoerfert, hfinkel, tlwilmar, hbae, 
protze.joachim, AndreyChurbanov, RaviNarayanaswamy, JonChesterfield, grokos.
Herald added subscribers: arphaman, guansong, hiraditya, jholewinski.

The tile directive is in OpenMP's Technical Report 8 and foreseeably will be 
part of the upcoming OpenMP 5.1 standard.

This implementation is based on an AST transformation providing a de-sugared 
loop nest. This makes it simple to forward the de-sugared transformation to 
loop associated directives taking the tiled loops. In contrast to other loop 
associated directives, the OMPTileDirective does not use CapturedStmts. Letting 
loop associated directives consume loops from different capture context would 
be difficult.

A significant amount of code generation logic is taking place in the Sema 
class. Eventually, I would prefer if these would move into the CodeGen 
component such that we could make use of the OpenMPIRBuilder, together with 
flang. Only expressions converting between the language's iteration variable 
and the logical iteration space need to take place in the semantic analyzer: 
Getting the of iterations (e.g. the overload resolution of `std::distance`) and 
converting the logical iteration number to the iteration variable (e.g. 
overload resolution of `iteration + .omp.iv`). In clang, only CXXForRangeStmt 
is also represented by its de-sugared components. However, OpenMP loop are not 
defined as syntatic sugar. Starting with an AST-based approach allows us to 
gradually move generated AST statements into CodeGen, instead all at once.

I would also like to refactor `checkOpenMPLoop` into its functionalities in a 
follow-up. In this patch it is used twice. Once for checking proper nesting and 
emitting diagnostics, and additionally for deriving the logical iteration space 
per-loop (instead of for the loop nest).


Repository:
  rC Clang

https://reviews.llvm.org/D76342

Files:
  clang/include/clang-c/Index.h
  clang/include/clang/AST/OpenMPClause.h
  clang/include/clang/AST/RecursiveASTVisitor.h
  clang/include/clang/AST/StmtOpenMP.h
  clang/include/clang/Basic/DiagnosticCommonKinds.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Basic/OpenMPKinds.def
  clang/include/clang/Basic/OpenMPKinds.h
  clang/include/clang/Basic/StmtNodes.td
  clang/include/clang/Parse/Parser.h
  clang/include/clang/Sema/Sema.h
  clang/include/clang/Serialization/ASTBitCodes.h
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/AST/StmtOpenMP.cpp
  clang/lib/AST/StmtPrinter.cpp
  clang/lib/AST/StmtProfile.cpp
  clang/lib/Analysis/CFG.cpp
  clang/lib/Basic/OpenMPKinds.cpp
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  clang/lib/CodeGen/CGStmt.cpp
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaExceptionSpec.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/lib/Sema/TreeTransform.h
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTReaderStmt.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/lib/Serialization/ASTWriterStmt.cpp
  clang/test/Index/openmp-tile.c
  clang/test/OpenMP/tile_ast_print.cpp
  clang/test/OpenMP/tile_codegen.cpp
  clang/test/OpenMP/tile_messages.cpp
  clang/tools/libclang/CIndex.cpp
  clang/tools/libclang/CXCursor.cpp
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  llvm/lib/Analysis/DependenceGraphBuilder.cpp

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


RE: [PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-09-11 Thread Narayanaswamy, Ravi via cfe-commits
Microsoft linker does not support linker script. 
We need to solution that works with all linkers.   The begin/end is supported 
by most linker of interest.

-Original Message-
From: Jon Chesterfield via Phabricator [mailto:revi...@reviews.llvm.org] 
Sent: Wednesday, September 11, 2019 12:21 PM
To: Dmitriev, Serguei N ; hfin...@anl.gov; 
a.bat...@hotmail.com; Narayanaswamy, Ravi ; 
jdoerf...@anl.gov; gheorghe-teod.ber...@ibm.com; Rokos, Georgios 

Cc: lebedev...@gmail.com; jonathanchesterfi...@gmail.com; Zakharin, Vyacheslav 
P ; sando...@cray.com; 
openmp-comm...@lists.llvm.org; cfe-commits@lists.llvm.org; mgo...@gentoo.org; 
zhang.guans...@gmail.com; mgrang.1...@gmail.com; t...@google.com; 
ztur...@roblox.com; peter.wal...@arm.com
Subject: [PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker 
script

JonChesterfield added a comment.

In D64943#173 , @ABataev wrote:

> In D64943#158 , @JonChesterfield 
> wrote:
>
> > > OpenMP linker script is known to cause problems for gold and lld linkers 
> > > on Linux and it will also cause problems for Windows enabling in future
> >
> > What are the known problems with the linker script? I'm wondering if they 
> > can be resolved without the overhead of introducing a new tool.
>
>
> They just do not support linker script. And, thus, cannot be used for 
> offloading. Only `ld` supports it.


In what respect? I've used linker scripts with both gold and lld, and both 
instances of --help text claim to support them. In the case of lld, a very 
complicated script hit a few internal errors, but I believe they've all been 
fixed since.


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

https://reviews.llvm.org/D64943



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits