[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)
Chris B via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 11:20:22 PST 2024
================
@@ -53,3 +53,6 @@ LLVM_FIXED_MD_KIND(MD_DIAssignID, "DIAssignID", 38)
LLVM_FIXED_MD_KIND(MD_coro_outside_frame, "coro.outside.frame", 39)
LLVM_FIXED_MD_KIND(MD_mmra, "mmra", 40)
LLVM_FIXED_MD_KIND(MD_noalias_addrspace, "noalias.addrspace", 41)
+// TODO: this will likelly be placed somewhere else,
+// so we don't mix dxil/hlsl/spirv and clang metadata
+LLVM_FIXED_MD_KIND(MD_dxil_controlflow_hints, "dx.controlflow.hints", 42)
----------------
llvm-beanz wrote:
Since this same hint is used for all HLSL targets not just DXIL, we should name it differently and translate it to a DXIL name late. Something like `llvm.branch` would match the pattern used by loop hints.
@nikic, HLSL has hints for backends to indicate when branches should be flattened or preserved. How do you feel about a generic `llvm.branch` metadata?
https://github.com/llvm/llvm-project/pull/116331
More information about the llvm-commits
mailing list