aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContextImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/IR/LLVMContextImpl.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp
index d8cdbf8..dfeabb4 100644
--- a/llvm/lib/IR/LLVMContextImpl.cpp
+++ b/llvm/lib/IR/LLVMContextImpl.cpp
@@ -147,33 +147,6 @@ LLVMContextImpl::~LLVMContextImpl() {
delete Pair.second;
}
-void LLVMContextImpl::dropTriviallyDeadConstantArrays() {
- SmallSetVector<ConstantArray *, 4> WorkList;
-
- // When ArrayConstants are of substantial size and only a few in them are
- // dead, starting WorkList with all elements of ArrayConstants can be
- // wasteful. Instead, starting WorkList with only elements that have empty
- // uses.
- for (ConstantArray *C : ArrayConstants)
- if (C->use_empty())
- WorkList.insert(C);
-
- while (!WorkList.empty()) {
- ConstantArray *C = WorkList.pop_back_val();
- if (C->use_empty()) {
- for (const Use &Op : C->operands()) {
- if (auto *COp = dyn_cast<ConstantArray>(Op))
- WorkList.insert(COp);
- }
- C->destroyConstant();
- }
- }
-}
-
-void Module::dropTriviallyDeadConstantArrays() {
- Context.pImpl->dropTriviallyDeadConstantArrays();
-}
-
namespace llvm {
/// Make MDOperand transparent for hashing.