aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
authorHelena Kotas <hekotas@microsoft.com>2024-11-25 16:10:48 -0800
committerGitHub <noreply@github.com>2024-11-25 16:10:48 -0800
commitcac978331f533c53b3f909dde673bb2d7b2ccede (patch)
tree4ef0c91dd5c5616465d834eca753b064a83b5f8a /llvm/lib/CodeGen/MachineSink.cpp
parent97fe5fa54c2e99dc0fe14fff1940b31bf697eff2 (diff)
downloadllvm-cac978331f533c53b3f909dde673bb2d7b2ccede.zip
llvm-cac978331f533c53b3f909dde673bb2d7b2ccede.tar.gz
llvm-cac978331f533c53b3f909dde673bb2d7b2ccede.tar.bz2
[HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (#117608)
Introduces `__builtin_hlsl_buffer_update_counter` clang buildin that is used to implement the `IncrementCounter` and `DecrementCounter` methods on `RWStructuredBuffer` and `RasterizerOrderedStructuredBuffer` (see Note). The builtin is translated to LLVM intrisic `llvm.dx.bufferUpdateCounter` or `llvm.spv.bufferUpdateCounter`. Introduces `BuiltinTypeMethodBuilder` helper in `HLSLExternalSemaSource` that enables adding methods to builtin types using builder pattern like this: ``` BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName", ReturnType) .addParam("param_name", Type, InOutModifier) .callBuiltin("buildin_name", { BuiltinParams }) .finalizeMethod(); ``` Fixes #113513 [First version](llvm/llvm-project#114148) of this PR was reverted because of build break.
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
0 files changed, 0 insertions, 0 deletions