[llvm] [DirectX][Docs] Update DXILArchitecture documentation (PR #86198)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 14:16:34 PDT 2024
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/86198
>From be275a02593ce59fe917acabff7dca057904e6b4 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi <farzonlotfi at microsoft.com>
Date: Thu, 21 Mar 2024 17:07:30 -0400
Subject: [PATCH] [DirectX][Docs] Update DXILArchitecture documentation for
instruction expansion
---
llvm/docs/DirectX/DXILArchitecture.rst | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/llvm/docs/DirectX/DXILArchitecture.rst b/llvm/docs/DirectX/DXILArchitecture.rst
index d6712bea4f7712..dd39429d53d87f 100644
--- a/llvm/docs/DirectX/DXILArchitecture.rst
+++ b/llvm/docs/DirectX/DXILArchitecture.rst
@@ -61,6 +61,19 @@ on the utilities described in "Common Code" above in order to share
logic with both the DirectX backend and with Clang's codegen of HLSL
support as much as possible.
+The DirectX Intrinsic Expansion Pass
+====================================
+There are intrinsics that don't map directly to DXIL Ops. In some cases
+an intrinsic needs to be expanded to a set of LLVM IR instructions. In
+other cases an intrinsic needs modifications to the arguments or return
+values of a DXIL Op. This pass (`DXILIntrinsicExpansion.cpp`) handles all
+the cases where our intrinsics don't have a one to one mapping. You should
+also consider using this pass when the expansion is specific to DXIL so
+as to keep implementation details out of CodeGen. Finally, there is an
+expectation that we maintain vectors through this pass. Therefore, best
+practice would be to avoid scalarization in this pass.
+
+
The DirectX Backend
===================
More information about the llvm-commits
mailing list