[PATCH] D127728: [BitcodeReader] Allow reading pointer types from old IR
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 08:08:53 PDT 2022
sebastian-ne updated this revision to Diff 438405.
sebastian-ne added a comment.
I found one more place where type information from dxil needs to be extracted and that’s metadata.
The patch now adds a second callback, which allows changing metadata while it’s read in.
In the test, that’s used to replace a pointer value metadata with a tuple of the original value and metadata that stores its type information.
I wasn’t able to store type info about metadata without replacing it because the values get indistinguishable after being read (e.g. an i8* and an i32* both end up as a ptr).
The callback for function types now takes a `Value`, which should make it easy to extend for CallInstructions or others if that’s needed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127728/new/
https://reviews.llvm.org/D127728
Files:
llvm/include/llvm/Bitcode/BitcodeReader.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.h
llvm/unittests/Bitcode/BitReaderTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127728.438405.patch
Type: text/x-patch
Size: 25408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220620/69289083/attachment.bin>
More information about the llvm-commits
mailing list