[PATCH] D76344: [hip] Revise `GlobalDecl` constructors. NFC.

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 17 23:13:26 PDT 2020


hliao created this revision.
hliao added a reviewer: yaxunl.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

- https://reviews.llvm.org/D68578 revises the `GlobalDecl` constructors to ensure all GPU kernels have `ReferenceKenelKind` initialized properly with an explicit constructor and static one. But, there are lots of places using the implicit constructor triggering the assertion on non-GPU kernels. That's found in compilation of many tests and workloads.
- Fixing all of them may change more code and, more importantly, all of them assumes the default kernel reference kind. This patch changes that constructor to tell `CUDAGlobalAttr` and construct `GlobalDecl` properly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76344

Files:
  clang/include/clang/AST/GlobalDecl.h
  clang/lib/AST/Expr.cpp
  clang/lib/AST/ItaniumMangle.cpp
  clang/lib/AST/Mangle.cpp
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/lib/CodeGen/CGDecl.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76344.250995.patch
Type: text/x-patch
Size: 6943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200318/f1b32ba8/attachment.bin>


More information about the cfe-commits mailing list