Skip to content

Commit be275a0

Browse files
committed
[DirectX][Docs] Update DXILArchitecture documentation
for instruction expansion
1 parent 2ab106c commit be275a0

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. This pass (`DXILIntrinsicExpansion.cpp`) handles all
70+
the cases where our intrinsics don't have a one to one mapping. You should
71+
also consider using this pass when the expansion is specific to DXIL so
72+
as to keep implementation details out of CodeGen. Finally, there is an
73+
expectation that we maintain vectors 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)