commit | 520773b47eba0df02730b929df073e1a38474bae | [log] [tgz] |
---|---|---|
author | Helena Kotas <hekotas@microsoft.com> | Wed May 14 18:41:17 2025 -0700 |
committer | GitHub <noreply@github.com> | Wed May 14 18:41:17 2025 -0700 |
tree | 1fa2cd37e286512bb22814d354737faaba594196 | |
parent | 34be80aa6edda60e240e4ea46f28b1b54ababf72 [diff] |
[HLSL] Add resource constructor with implicit binding for global resources (#138976) Adds constructor for resources with implicit binding and applies it to all resources without binding at the global scope. Adds Clang builtin function `__builtin_hlsl_resource_handlefromimplicitbinding` that gets translated to `llvm.dx|spv.resource.handlefromimplicitbinding` intrinsic calls. Specific bindings are assigned in DXILResourceImplicitBinding pass. Design proposals: https://github.com/llvm/wg-hlsl/blob/main/proposals/0024-implicit-resource-binding.md https://github.com/llvm/wg-hlsl/blob/main/proposals/0025-resource-constructors.md One change from the proposals is that the `orderId` parameter is added onto the constructor. Originally it was supposed to be generated in codegen when the `llvm.dx|spv.resource.handlefromimplicitbinding` call is emitted, but that is not possible because the call is inside a constructor, and the constructor body is generated once per resource type and not resource instance. So the only way to inject instance-based data like `orderId` into the `llvm.dx|spv.resource.handlefromimplicitbinding` call is that it must come in via the constructor argument. Closes #136784
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.