This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP] Parsing and sema support for device clause
ClosedPublic

Authored by kkwli0 on Jul 23 2015, 12:24 PM.

Details

Summary

Parsing and sema support for device clause

Diff Detail

Event Timeline

kkwli0 updated this revision to Diff 30515.Jul 23 2015, 12:24 PM
kkwli0 retitled this revision from to [OPENMP] Parsing and sema support for device clause.
kkwli0 updated this object.
kkwli0 added subscribers: Hahnfeld, cfe-commits.
ABataev added inline comments.Jul 23 2015, 8:39 PM
include/clang/AST/OpenMPClause.h
2396–2398

Must be cast<Expr>, because it is known that this is an expression and it cannot be nullptr

2405

return child_range(&Device, &Device + 1);

lib/AST/StmtProfile.cpp
435

I think device is always not nullptr

tools/libclang/CIndex.cpp
2056

Visitor->AddStmt(C->getDevice());

kkwli0 marked 4 inline comments as done.Jul 24 2015, 9:08 AM
kkwli0 updated this revision to Diff 30578.Jul 24 2015, 10:55 AM

Update the patch based on the review comments.

ABataev accepted this revision.Jul 25 2015, 1:43 AM
ABataev edited edge metadata.
This revision is now accepted and ready to land.Jul 25 2015, 1:43 AM

In ParseOpenMP.cpp, it failed the patch because OMPC_ordered was already added before OMPC_device. But it does not affect the patch if we add it after this.

Please produce a new patch with this update.

kkwli0 updated this revision to Diff 31227.Aug 3 2015, 6:43 AM
kkwli0 edited edge metadata.

This patch is to resolve the merge issue and no new code is added.

This has landed.
Commit
C:\llvmtrunk\tools\clang\include\clang\AST\DataRecursiveASTVisitor.h
C:\llvmtrunk\tools\clang\include\clang\AST\OpenMPClause.h
C:\llvmtrunk\tools\clang\include\clang\AST\RecursiveASTVisitor.h
C:\llvmtrunk\tools\clang\include\clang\Basic\OpenMPKinds.def
C:\llvmtrunk\tools\clang\include\clang\Sema\Sema.h
C:\llvmtrunk\tools\clang\lib\AST\StmtPrinter.cpp
C:\llvmtrunk\tools\clang\lib\AST\StmtProfile.cpp
C:\llvmtrunk\tools\clang\lib\Basic\OpenMPKinds.cpp
C:\llvmtrunk\tools\clang\lib\CodeGen\CGStmtOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Parse\ParseOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Sema\SemaOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Sema\TreeTransform.h
C:\llvmtrunk\tools\clang\lib\Serialization\ASTReaderStmt.cpp
C:\llvmtrunk\tools\clang\lib\Serialization\ASTWriterStmt.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_data_device_messages.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_device_messages.cpp
C:\llvmtrunk\tools\clang\tools\libclang\CIndex.cpp
C:\llvmtrunk\tools\clang\lib\Serialization\ASTReaderStmt.cpp
C:\llvmtrunk\tools\clang\lib\AST\StmtProfile.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_device_messages.cpp
C:\llvmtrunk\tools\clang\lib\Parse\ParseOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Basic\OpenMPKinds.cpp
C:\llvmtrunk\tools\clang\lib\Serialization\ASTWriterStmt.cpp
C:\llvmtrunk\tools\clang\tools\libclang\CIndex.cpp
C:\llvmtrunk\tools\clang\include\clang\Sema\Sema.h
C:\llvmtrunk\tools\clang\lib\AST\StmtPrinter.cpp
C:\llvmtrunk\tools\clang\lib\CodeGen\CGStmtOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Sema\TreeTransform.h
C:\llvmtrunk\tools\clang\include\clang\Basic\OpenMPKinds.def
C:\llvmtrunk\tools\clang\include\clang\AST\DataRecursiveASTVisitor.h
C:\llvmtrunk\tools\clang\include\clang\AST\OpenMPClause.h
C:\llvmtrunk\tools\clang\lib\Sema\SemaOpenMP.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_data_device_messages.cpp
C:\llvmtrunk\tools\clang\include\clang\AST\RecursiveASTVisitor.h
At revision: 244325

ABataev closed this revision.Aug 12 2015, 9:45 PM