Skip to content

[DirectX][Docs] Add DXILIntrinsicExpansion Pass to DXILArchitecture.rst #86198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions llvm/docs/DirectX/DXILArchitecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
===================

Expand Down