[llvm] 6ca6780 - Clean up after transition into opaque pointers. NFC (#102631)
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 04:29:30 PDT 2024
Author: Bjorn Pettersson
Date: 2024-08-12T13:28:26+02:00
New Revision: 6ca678074ba58e3db50a764400f6137782d338cf
URL: https://github.com/llvm/llvm-project/commit/6ca678074ba58e3db50a764400f6137782d338cf
DIFF: https://github.com/llvm/llvm-project/commit/6ca678074ba58e3db50a764400f6137782d338cf.diff
LOG: Clean up after transition into opaque pointers. NFC (#102631)
LegacyPointerTypes is not used any longer and can be removed from
the LLVM context.
Also remove a copy-pasted code comment in TypedPointerType that
doesn't make sense (since there is no special case for address space
zero in the TypedPointerType::get implementation).
Added:
Modified:
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/TypedPointerType.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h
index 8e9ca21d149f6..e76f004b590ef 100644
--- a/llvm/lib/IR/LLVMContextImpl.h
+++ b/llvm/lib/IR/LLVMContextImpl.h
@@ -1608,7 +1608,6 @@ class LLVMContextImpl {
DenseMap<std::pair<Type *, ElementCount>, VectorType *> VectorTypes;
PointerType *AS0PointerType = nullptr; // AddrSpace = 0
DenseMap<unsigned, PointerType *> PointerTypes;
- DenseMap<std::pair<Type *, unsigned>, PointerType *> LegacyPointerTypes;
DenseMap<std::pair<Type *, unsigned>, TypedPointerType *> ASTypedPointerTypes;
/// ValueHandles - This map keeps track of all of the value handles that are
diff --git a/llvm/lib/IR/TypedPointerType.cpp b/llvm/lib/IR/TypedPointerType.cpp
index ed91080ba8b8b..85f7a5a2ae4c3 100644
--- a/llvm/lib/IR/TypedPointerType.cpp
+++ b/llvm/lib/IR/TypedPointerType.cpp
@@ -20,7 +20,6 @@ TypedPointerType *TypedPointerType::get(Type *EltTy, unsigned AddressSpace) {
LLVMContextImpl *CImpl = EltTy->getContext().pImpl;
- // Since AddressSpace #0 is the common case, we special case it.
TypedPointerType *&Entry =
CImpl->ASTypedPointerTypes[std::make_pair(EltTy, AddressSpace)];
More information about the llvm-commits
mailing list