[llvm] [DirectX][Docs] Add DXILIntrinsicExpansion Pass to DXILArchitecture.rst (PR #86198)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 04:23:44 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 1/2] [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
===================
>From 6ee2c074e108275adedcbcc570fcc12213e9911a Mon Sep 17 00:00:00 2001
From: Farzon Lotfi <farzon at farzon.com>
Date: Fri, 22 Mar 2024 07:23:27 -0400
Subject: [PATCH 2/2] address pr comments
---
llvm/docs/DirectX/DXILArchitecture.rst | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/llvm/docs/DirectX/DXILArchitecture.rst b/llvm/docs/DirectX/DXILArchitecture.rst
index dd39429d53d87f..32b1e72deae7cd 100644
--- a/llvm/docs/DirectX/DXILArchitecture.rst
+++ b/llvm/docs/DirectX/DXILArchitecture.rst
@@ -66,11 +66,11 @@ 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
+values of a DXIL Op. The `DXILIntrinsicExpansion` pass handles all
+the cases where our intrinsics don't have a one to one mapping. This
+pass may also be used when the expansion is specific to DXIL to keep
+implementation details out of CodeGen. Finally, there is an expectation
+that we maintain vector types through this pass. Therefore, best
practice would be to avoid scalarization in this pass.
More information about the llvm-commits
mailing list