[all-commits] [llvm/llvm-project] 4cf01e: [hip] Revise `GlobalDecl` constructors. NFC.

darkbuck via All-commits all-commits at lists.llvm.org
Wed Mar 18 06:33:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4cf01ed75e35e7bd3ef8ef1a2192c7f4656ab545
      https://github.com/llvm/llvm-project/commit/4cf01ed75e35e7bd3ef8ef1a2192c7f4656ab545
  Author: Michael Liao <michael.hliao at gmail.com>
  Date:   2020-03-18 (Wed, 18 Mar 2020)

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

  Log Message:
  -----------
  [hip] Revise `GlobalDecl` constructors. NFC.

Summary:
- 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.

Reviewers: yaxunl

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76344




More information about the All-commits mailing list