[PATCH] D62475: Change DIEnumerator payload type to APInt
l via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 27 02:14:56 PDT 2019
LemonBoy created this revision.
Herald added subscribers: llvm-commits, hiraditya, aprantl.
Herald added a project: LLVM.
As briefly discussed on the ML <https://lists.llvm.org/pipermail/llvm-dev/2017-December/119475.html> this patch aims to remove any limitation on the enumerator values.
A few notes:
- In `LLParser::ParseDIEnumerator` there's a mild hack: the reader returns a "tight" integer (eg `0x7FFFFFFF` uses 31 bits) and that makes it sign-extend to `-1`. The solution is to add a leading zero to avoid any ambiguity.
- The value encoding is the same one used for integer constants using > 64 bit, I've recycled the old slot used for the value to hold the bit width and the whole APInt payload is dumped after the name slot.
- The DWARF code emits a DATA references for big constants and (I guess due to point 1) I had to slightly change a single test case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62475
Files:
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/Target/BPF/BTFDebug.cpp
llvm/test/Assembler/DIEnumeratorBig.ll
llvm/test/DebugInfo/Generic/debug-info-enum.ll
llvm/unittests/IR/MetadataTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62475.201485.patch
Type: text/x-patch
Size: 10917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190527/4c475729/attachment.bin>
More information about the llvm-commits
mailing list