Skip to content

Commit d51f1c4

Browse files
farzonlFarzon Lotfi
andauthored
[DirectX][Docs] Add DXILIntrinsicExpansion Pass to DXILArchitecture.rst (#86198)
Completes #84839 --------- Co-authored-by: Farzon Lotfi <[email protected]>
1 parent d03f470 commit d51f1c4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

llvm/docs/DirectX/DXILArchitecture.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ on the utilities described in "Common Code" above in order to share
6161
logic with both the DirectX backend and with Clang's codegen of HLSL
6262
support as much as possible.
6363

64+
The DirectX Intrinsic Expansion Pass
65+
====================================
66+
There are intrinsics that don't map directly to DXIL Ops. In some cases
67+
an intrinsic needs to be expanded to a set of LLVM IR instructions. In
68+
other cases an intrinsic needs modifications to the arguments or return
69+
values of a DXIL Op. The `DXILIntrinsicExpansion` pass handles all
70+
the cases where our intrinsics don't have a one to one mapping. This
71+
pass may also be used when the expansion is specific to DXIL to keep
72+
implementation details out of CodeGen. Finally, there is an expectation
73+
that we maintain vector types through this pass. Therefore, best
74+
practice would be to avoid scalarization in this pass.
75+
76+
6477
The DirectX Backend
6578
===================
6679

0 commit comments

Comments
 (0)