[all-commits] [llvm/llvm-project] 727f39: [DirectX] Implement Shader Flags Analysis for ResM...
Deric C. via All-commits
all-commits at lists.llvm.org
Thu Apr 10 16:07:10 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 727f3921e7af7a4b0f1e59635ebb99a52bd173c3
https://github.com/llvm/llvm-project/commit/727f3921e7af7a4b0f1e59635ebb99a52bd173c3
Author: Deric C. <cheung.deric at gmail.com>
Date: 2025-04-10 (Thu, 10 Apr 2025)
Changed paths:
M clang/include/clang/Basic/CodeGenOptions.def
M clang/include/clang/Driver/Options.td
M clang/lib/CodeGen/CGHLSLRuntime.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
A clang/test/CodeGenHLSL/res-may-alias.hlsl
M llvm/lib/Target/DirectX/DXILShaderFlags.cpp
M llvm/lib/Target/DirectX/DXILShaderFlags.h
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-alias-0.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-alias-1.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-shadermodel6.6.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-shadermodel6.7.ll
A llvm/test/CodeGen/DirectX/ShaderFlags/res-may-not-alias-shadermodel6.8.ll
M llvm/test/CodeGen/DirectX/ShaderFlags/typed-uav-load-additional-formats.ll
Log Message:
-----------
[DirectX] Implement Shader Flags Analysis for ResMayNotAlias (#131070)
Fixes #112270
Completed ACs:
- `-res-may-alias` clang-dxc command-line option added
- It inserts and sets a module metadata flag `dx.resmayalias` to 1
- Shader flag set appropriately:
- The flag IS NOT set if DXIL Version <= 1.6 OR the command-line option
`-res-may-alias` is specified
- Otherwise the flag IS set when:
- DXIL Version > 1.7 AND function uses UAVs, OR
- DXIL Version <= 1.7 AND UAVs present globally
- Add tests
- Tests for Shader Models 6.6, 6.7, and 6.8 corresponding to DXIL
Versions 1.6, 1.7, and 1.8
- Tests (`res-may-alias-0.ll`/`res-may-alias-1.ll`) for when the module
metadata flag `dx.resmayalias` is set to 0 or 1 respectively
- A frontend test (`res-may-alias.hlsl`) for testing that that the
command-line option `-res-may-alias` inserts `dx.resmayalias` module
metadata correctly
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