[PATCH] D144901: [Bitcode] Remove typed pointer abbreviation
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 13:11:28 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG01dacc41f3c2: [Bitcode] Remove typed pointer abbreviation (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144901/new/
https://reviews.llvm.org/D144901
Files:
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -901,15 +901,8 @@
uint64_t NumBits = VE.computeBitsRequiredForTypeIndicies();
- // Abbrev for TYPE_CODE_POINTER.
- auto Abbv = std::make_shared<BitCodeAbbrev>();
- Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_POINTER));
- Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, NumBits));
- Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0
- unsigned PtrAbbrev = Stream.EmitAbbrev(std::move(Abbv));
-
// Abbrev for TYPE_CODE_OPAQUE_POINTER.
- Abbv = std::make_shared<BitCodeAbbrev>();
+ auto Abbv = std::make_shared<BitCodeAbbrev>();
Abbv->Add(BitCodeAbbrevOp(bitc::TYPE_CODE_OPAQUE_POINTER));
Abbv->Add(BitCodeAbbrevOp(0)); // Addrspace = 0
unsigned OpaquePtrAbbrev = Stream.EmitAbbrev(std::move(Abbv));
@@ -995,8 +988,6 @@
Code = bitc::TYPE_CODE_POINTER;
TypeVals.push_back(VE.getTypeID(PTy->getNonOpaquePointerElementType()));
TypeVals.push_back(AddressSpace);
- if (AddressSpace == 0)
- AbbrevToUse = PtrAbbrev;
}
break;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144901.500890.patch
Type: text/x-patch
Size: 1219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230227/00d301f0/attachment.bin>
More information about the llvm-commits
mailing list