[llvm] [DirectX][Docs] Update DXILArchitecture documentation (PR #86198)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 14:10:22 PDT 2024
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/86198
for instruction expansion
Completes #84839
>From 78392bab8f768a7df64731d453a26dd9a9c4d8d8 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..b3d29cba0a3c95 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