[llvm] d51f1c4 - [DirectX][Docs] Add DXILIntrinsicExpansion Pass to DXILArchitecture.rst (#86198)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 05:14:30 PDT 2024


Author: Farzon Lotfi
Date: 2024-03-22T08:14:26-04:00
New Revision: d51f1c442b1dc999267726a33e25b7d019726c89

URL: https://github.com/llvm/llvm-project/commit/d51f1c442b1dc999267726a33e25b7d019726c89
DIFF: https://github.com/llvm/llvm-project/commit/d51f1c442b1dc999267726a33e25b7d019726c89.diff

LOG: [DirectX][Docs] Add DXILIntrinsicExpansion  Pass to DXILArchitecture.rst (#86198)

Completes #84839

---------

Co-authored-by: Farzon Lotfi <farzon at farzon.com>

Added: 
    

Modified: 
    llvm/docs/DirectX/DXILArchitecture.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/DirectX/DXILArchitecture.rst b/llvm/docs/DirectX/DXILArchitecture.rst
index d6712bea4f7712..32b1e72deae7cd 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. 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.
+
+
 The DirectX Backend
 ===================
 


        


More information about the llvm-commits mailing list