[all-commits] [llvm/llvm-project] 5bdff8: [HLSL] Implement default constant buffer `$Globals...

Helena Kotas via All-commits all-commits at lists.llvm.org
Mon Feb 24 15:08:46 PST 2025


  Branch: refs/heads/users/hekota/pr-128589-default-buffer-2
  Home:   https://github.com/llvm/llvm-project
  Commit: 5bdff894dd52d2ad68c1e3cfb62f007d2bc647c2
      https://github.com/llvm/llvm-project/commit/5bdff894dd52d2ad68c1e3cfb62f007d2bc647c2
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2025-02-20 (Thu, 20 Feb 2025)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/Sema/SemaHLSL.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    A clang/test/AST/HLSL/default_cbuffer.hlsl
    M clang/test/CodeGenHLSL/basic_types.hlsl
    A clang/test/CodeGenHLSL/default_cbuffer.hlsl

  Log Message:
  -----------
  [HLSL] Implement default constant buffer `$Globals` (#125807)

All variable declarations in the global scope that are not resources,
static or empty are implicitly added to implicit constant buffer
`$Globals`. They are created in `hlsl_constant` address space and
collected in an implicit `HLSLBufferDecl` node that is added to the AST
at the end of the translation unit. Codegen is the same as for explicit
constant buffers.

Fixes #123801


  Commit: 62df92e3d0981d3b2a7d67c834dc62f7101b363d
      https://github.com/llvm/llvm-project/commit/62df92e3d0981d3b2a7d67c834dc62f7101b363d
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2025-02-24 (Mon, 24 Feb 2025)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/Sema/SemaHLSL.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/Sema/SemaHLSL.cpp

  Log Message:
  -----------
  Allocate list of default constant decls with ASTContext


Compare: https://github.com/llvm/llvm-project/compare/5bdff894dd52%5E...62df92e3d098

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list