[PATCH] D122270: Support converting pointers from opaque to typed
Chris Bieneman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 23 07:27:44 PDT 2022
beanz added a comment.
A few notes about this PR.
For those not familiar with the bitcode writing infrastructure, the ValueEnumerator assigns stable IDs to IR constructs (llvm::Values, llvm::Types...) so they can refer to each other. It is not directly involved in writing bitcode, and the general approach in the ValueEnumerator has been unchanged for a very long time.
I'm trying to balance two conflicting factors with the work to support DXIL:
(1) Keeping the DirectX backend small and easy to maintain by avoiding unnecessary code duplication
-and-
(2) Keeping the DXIL writer contained in the backend
This patch adds a small override to the ValueEnumerator to insert an i8* type at the beginning of the type list. Having i8* at the beginning of the list is required to satisfy TypeList ordering constraints that the 3.7 bitcode reader (and the modern one too) requires.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122270/new/
https://reviews.llvm.org/D122270
More information about the llvm-commits
mailing list