Coverage Report

Created: 2018-09-23 22:08

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/ADT/ScopedHashTable.h
Line
Count
Source
1
//===- ScopedHashTable.h - A simple scoped hash table -----------*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file implements an efficient scoped hash table, which is useful for
11
// things like dominator-based optimizations.  This allows clients to do things
12
// like this:
13
//
14
//  ScopedHashTable<int, int> HT;
15
//  {
16
//    ScopedHashTableScope<int, int> Scope1(HT);
17
//    HT.insert(0, 0);
18
//    HT.insert(1, 1);
19
//    {
20
//      ScopedHashTableScope<int, int> Scope2(HT);
21
//      HT.insert(0, 42);
22
//    }
23
//  }
24
//
25
// Looking up the value for "0" in the Scope2 block will return 42.  Looking
26
// up the value for 0 before 42 is inserted or after Scope2 is popped will
27
// return 0.
28
//
29
//===----------------------------------------------------------------------===//
30
31
#ifndef LLVM_ADT_SCOPEDHASHTABLE_H
32
#define LLVM_ADT_SCOPEDHASHTABLE_H
33
34
#include "llvm/ADT/DenseMap.h"
35
#include "llvm/ADT/DenseMapInfo.h"
36
#include "llvm/Support/Allocator.h"
37
#include <cassert>
38
#include <new>
39
40
namespace llvm {
41
42
template <typename K, typename V, typename KInfo = DenseMapInfo<K>,
43
          typename AllocatorTy = MallocAllocator>
44
class ScopedHashTable;
45
46
template <typename K, typename V>
47
class ScopedHashTableVal {
48
  ScopedHashTableVal *NextInScope;
49
  ScopedHashTableVal *NextForKey;
50
  K Key;
51
  V Val;
52
53
27.0M
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >::ScopedHashTableVal(llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> const&, std::__1::pair<unsigned int, unsigned int> const&)
Line
Count
Source
53
1.07k
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::ScopedHashTableVal(llvm::MachineInstr* const&, unsigned int const&)
Line
Count
Source
53
6.91M
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::ScopedHashTableVal((anonymous namespace)::SimpleValue const&, llvm::Value* const&)
Line
Count
Source
53
14.9M
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>::ScopedHashTableVal(llvm::MemoryLocation const&, unsigned int const&)
Line
Count
Source
53
1.15k
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
EarlyCSE.cpp:llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::ScopedHashTableVal(llvm::Value* const&, (anonymous namespace)::EarlyCSE::LoadValue const&)
Line
Count
Source
53
5.11M
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::ScopedHashTableVal((anonymous namespace)::CallValue const&, std::__1::pair<llvm::Instruction*, unsigned int> const&)
Line
Count
Source
53
44.3k
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
54
55
public:
56
27.0M
  const K &getKey() const { return Key; }
llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >::getKey() const
Line
Count
Source
56
1.07k
  const K &getKey() const { return Key; }
llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::getKey() const
Line
Count
Source
56
6.91M
  const K &getKey() const { return Key; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::getKey() const
Line
Count
Source
56
44.3k
  const K &getKey() const { return Key; }
llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>::getKey() const
Line
Count
Source
56
1.15k
  const K &getKey() const { return Key; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::getKey() const
Line
Count
Source
56
5.11M
  const K &getKey() const { return Key; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getKey() const
Line
Count
Source
56
14.9M
  const K &getKey() const { return Key; }
57
  const V &getValue() const { return Val; }
58
2.60M
  V &getValue() { return Val; }
llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >::getValue()
Line
Count
Source
58
90
  V &getValue() { return Val; }
llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::getValue()
Line
Count
Source
58
631k
  V &getValue() { return Val; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getValue()
Line
Count
Source
58
826k
  V &getValue() { return Val; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::getValue()
Line
Count
Source
58
1.14M
  V &getValue() { return Val; }
llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>::getValue()
Line
Count
Source
58
36
  V &getValue() { return Val; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::getValue()
Line
Count
Source
58
2.03k
  V &getValue() { return Val; }
59
60
31.0M
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >::getNextForKey()
Line
Count
Source
60
1.12k
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::getNextForKey()
Line
Count
Source
60
7.56M
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::getNextForKey()
Line
Count
Source
60
46.2k
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>::getNextForKey()
Line
Count
Source
60
1.15k
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::getNextForKey()
Line
Count
Source
60
6.07M
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getNextForKey()
Line
Count
Source
60
17.4M
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
61
  const ScopedHashTableVal *getNextForKey() const { return NextForKey; }
62
27.0M
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >::getNextInScope()
Line
Count
Source
62
1.07k
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::getNextInScope()
Line
Count
Source
62
6.91M
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::getNextInScope()
Line
Count
Source
62
44.3k
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>::getNextInScope()
Line
Count
Source
62
1.15k
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::getNextInScope()
Line
Count
Source
62
5.11M
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getNextInScope()
Line
Count
Source
62
14.9M
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
63
64
  template <typename AllocatorTy>
65
  static ScopedHashTableVal *Create(ScopedHashTableVal *nextInScope,
66
                                    ScopedHashTableVal *nextForKey,
67
                                    const K &key, const V &val,
68
27.0M
                                    AllocatorTy &Allocator) {
69
27.0M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
27.0M
    // Set up the value.
71
27.0M
    new (New) ScopedHashTableVal(key, val);
72
27.0M
    New->NextInScope = nextInScope;
73
27.0M
    New->NextForKey = nextForKey;
74
27.0M
    return New;
75
27.0M
  }
llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >* llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >::Create<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >(llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >*, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >*, llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> const&, std::__1::pair<unsigned int, unsigned int> const&, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul>&)
Line
Count
Source
68
1.07k
                                    AllocatorTy &Allocator) {
69
1.07k
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
1.07k
    // Set up the value.
71
1.07k
    new (New) ScopedHashTableVal(key, val);
72
1.07k
    New->NextInScope = nextInScope;
73
1.07k
    New->NextForKey = nextForKey;
74
1.07k
    return New;
75
1.07k
  }
llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>* llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::Create<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >(llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>*, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>*, llvm::MachineInstr* const&, unsigned int const&, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul>&)
Line
Count
Source
68
6.91M
                                    AllocatorTy &Allocator) {
69
6.91M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
6.91M
    // Set up the value.
71
6.91M
    new (New) ScopedHashTableVal(key, val);
72
6.91M
    New->NextInScope = nextInScope;
73
6.91M
    New->NextForKey = nextForKey;
74
6.91M
    return New;
75
6.91M
  }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>* llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::Create<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >(llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>*, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>*, (anonymous namespace)::SimpleValue const&, llvm::Value* const&, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul>&)
Line
Count
Source
68
14.9M
                                    AllocatorTy &Allocator) {
69
14.9M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
14.9M
    // Set up the value.
71
14.9M
    new (New) ScopedHashTableVal(key, val);
72
14.9M
    New->NextInScope = nextInScope;
73
14.9M
    New->NextForKey = nextForKey;
74
14.9M
    return New;
75
14.9M
  }
llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>* llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>::Create<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >(llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>*, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>*, llvm::MemoryLocation const&, unsigned int const&, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul>&)
Line
Count
Source
68
1.15k
                                    AllocatorTy &Allocator) {
69
1.15k
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
1.15k
    // Set up the value.
71
1.15k
    new (New) ScopedHashTableVal(key, val);
72
1.15k
    New->NextInScope = nextInScope;
73
1.15k
    New->NextForKey = nextForKey;
74
1.15k
    return New;
75
1.15k
  }
EarlyCSE.cpp:llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>* llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::Create<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >(llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>*, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>*, llvm::Value* const&, (anonymous namespace)::EarlyCSE::LoadValue const&, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul>&)
Line
Count
Source
68
5.11M
                                    AllocatorTy &Allocator) {
69
5.11M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
5.11M
    // Set up the value.
71
5.11M
    new (New) ScopedHashTableVal(key, val);
72
5.11M
    New->NextInScope = nextInScope;
73
5.11M
    New->NextForKey = nextForKey;
74
5.11M
    return New;
75
5.11M
  }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >* llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::Create<llvm::MallocAllocator>(llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >*, llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >*, (anonymous namespace)::CallValue const&, std::__1::pair<llvm::Instruction*, unsigned int> const&, llvm::MallocAllocator&)
Line
Count
Source
68
44.3k
                                    AllocatorTy &Allocator) {
69
44.3k
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
44.3k
    // Set up the value.
71
44.3k
    new (New) ScopedHashTableVal(key, val);
72
44.3k
    New->NextInScope = nextInScope;
73
44.3k
    New->NextForKey = nextForKey;
74
44.3k
    return New;
75
44.3k
  }
76
77
27.0M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
27.0M
    // Free memory referenced by the item.
79
27.0M
    this->~ScopedHashTableVal();
80
27.0M
    Allocator.Deallocate(this);
81
27.0M
  }
void llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >::Destroy<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >(llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul>&)
Line
Count
Source
77
1.07k
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
1.07k
    // Free memory referenced by the item.
79
1.07k
    this->~ScopedHashTableVal();
80
1.07k
    Allocator.Deallocate(this);
81
1.07k
  }
void llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::Destroy<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >(llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul>&)
Line
Count
Source
77
6.91M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
6.91M
    // Free memory referenced by the item.
79
6.91M
    this->~ScopedHashTableVal();
80
6.91M
    Allocator.Deallocate(this);
81
6.91M
  }
EarlyCSE.cpp:void llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::Destroy<llvm::MallocAllocator>(llvm::MallocAllocator&)
Line
Count
Source
77
44.3k
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
44.3k
    // Free memory referenced by the item.
79
44.3k
    this->~ScopedHashTableVal();
80
44.3k
    Allocator.Deallocate(this);
81
44.3k
  }
void llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>::Destroy<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >(llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul>&)
Line
Count
Source
77
1.15k
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
1.15k
    // Free memory referenced by the item.
79
1.15k
    this->~ScopedHashTableVal();
80
1.15k
    Allocator.Deallocate(this);
81
1.15k
  }
EarlyCSE.cpp:void llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::Destroy<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >(llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul>&)
Line
Count
Source
77
5.11M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
5.11M
    // Free memory referenced by the item.
79
5.11M
    this->~ScopedHashTableVal();
80
5.11M
    Allocator.Deallocate(this);
81
5.11M
  }
EarlyCSE.cpp:void llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::Destroy<llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >(llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul>&)
Line
Count
Source
77
14.9M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
14.9M
    // Free memory referenced by the item.
79
14.9M
    this->~ScopedHashTableVal();
80
14.9M
    Allocator.Deallocate(this);
81
14.9M
  }
82
};
83
84
template <typename K, typename V, typename KInfo = DenseMapInfo<K>,
85
          typename AllocatorTy = MallocAllocator>
86
class ScopedHashTableScope {
87
  /// HT - The hashtable that we are active for.
88
  ScopedHashTable<K, V, KInfo, AllocatorTy> &HT;
89
90
  /// PrevScope - This is the scope that we are shadowing in HT.
91
  ScopedHashTableScope *PrevScope;
92
93
  /// LastValInScope - This is the last value that was inserted for this scope
94
  /// or null if none have been inserted yet.
95
  ScopedHashTableVal<K, V> *LastValInScope;
96
97
public:
98
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, AllocatorTy> &HT);
99
  ScopedHashTableScope(ScopedHashTableScope &) = delete;
100
  ScopedHashTableScope &operator=(ScopedHashTableScope &) = delete;
101
  ~ScopedHashTableScope();
102
103
  ScopedHashTableScope *getParentScope() { return PrevScope; }
104
  const ScopedHashTableScope *getParentScope() const { return PrevScope; }
105
106
private:
107
  friend class ScopedHashTable<K, V, KInfo, AllocatorTy>;
108
109
27.0M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
27.0M
    return LastValInScope;
111
27.0M
  }
llvm::ScopedHashTableScope<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::getLastValInScope()
Line
Count
Source
109
1.07k
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
1.07k
    return LastValInScope;
111
1.07k
  }
llvm::ScopedHashTableScope<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::getLastValInScope()
Line
Count
Source
109
6.91M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
6.91M
    return LastValInScope;
111
6.91M
  }
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::getLastValInScope()
Line
Count
Source
109
14.9M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
14.9M
    return LastValInScope;
111
14.9M
  }
llvm::ScopedHashTableScope<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::getLastValInScope()
Line
Count
Source
109
1.15k
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
1.15k
    return LastValInScope;
111
1.15k
  }
EarlyCSE.cpp:llvm::ScopedHashTableScope<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::getLastValInScope()
Line
Count
Source
109
5.11M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
5.11M
    return LastValInScope;
111
5.11M
  }
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::getLastValInScope()
Line
Count
Source
109
44.3k
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
44.3k
    return LastValInScope;
111
44.3k
  }
112
113
27.0M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
27.0M
    LastValInScope = Val;
115
27.0M
  }
llvm::ScopedHashTableScope<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::setLastValInScope(llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >*)
Line
Count
Source
113
1.07k
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
1.07k
    LastValInScope = Val;
115
1.07k
  }
llvm::ScopedHashTableScope<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::setLastValInScope(llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>*)
Line
Count
Source
113
6.91M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
6.91M
    LastValInScope = Val;
115
6.91M
  }
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::setLastValInScope(llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>*)
Line
Count
Source
113
14.9M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
14.9M
    LastValInScope = Val;
115
14.9M
  }
llvm::ScopedHashTableScope<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::setLastValInScope(llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>*)
Line
Count
Source
113
1.15k
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
1.15k
    LastValInScope = Val;
115
1.15k
  }
EarlyCSE.cpp:llvm::ScopedHashTableScope<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::setLastValInScope(llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>*)
Line
Count
Source
113
5.11M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
5.11M
    LastValInScope = Val;
115
5.11M
  }
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::setLastValInScope(llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >*)
Line
Count
Source
113
44.3k
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
44.3k
    LastValInScope = Val;
115
44.3k
  }
116
};
117
118
template <typename K, typename V, typename KInfo = DenseMapInfo<K>>
119
class ScopedHashTableIterator {
120
  ScopedHashTableVal<K, V> *Node;
121
122
public:
123
  ScopedHashTableIterator(ScopedHashTableVal<K, V> *node) : Node(node) {}
124
125
  V &operator*() const {
126
    assert(Node && "Dereference end()");
127
    return Node->getValue();
128
  }
129
  V *operator->() const {
130
    return &Node->getValue();
131
  }
132
133
  bool operator==(const ScopedHashTableIterator &RHS) const {
134
    return Node == RHS.Node;
135
  }
136
  bool operator!=(const ScopedHashTableIterator &RHS) const {
137
    return Node != RHS.Node;
138
  }
139
140
  inline ScopedHashTableIterator& operator++() {          // Preincrement
141
    assert(Node && "incrementing past end()");
142
    Node = Node->getNextForKey();
143
    return *this;
144
  }
145
  ScopedHashTableIterator operator++(int) {        // Postincrement
146
    ScopedHashTableIterator tmp = *this; ++*this; return tmp;
147
  }
148
};
149
150
template <typename K, typename V, typename KInfo, typename AllocatorTy>
151
class ScopedHashTable {
152
public:
153
  /// ScopeTy - This is a helpful typedef that allows clients to get easy access
154
  /// to the name of the scope for this hash table.
155
  using ScopeTy = ScopedHashTableScope<K, V, KInfo, AllocatorTy>;
156
  using size_type = unsigned;
157
158
private:
159
  friend class ScopedHashTableScope<K, V, KInfo, AllocatorTy>;
160
161
  using ValTy = ScopedHashTableVal<K, V>;
162
163
  DenseMap<K, ValTy*, KInfo> TopLevelMap;
164
  ScopeTy *CurScope = nullptr;
165
166
  AllocatorTy Allocator;
167
168
public:
169
4.47M
  ScopedHashTable() = default;
llvm::ScopedHashTable<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::ScopedHashTable()
Line
Count
Source
169
1.95k
  ScopedHashTable() = default;
llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::ScopedHashTable()
Line
Count
Source
169
33.2k
  ScopedHashTable() = default;
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::ScopedHashTable()
Line
Count
Source
169
1.11M
  ScopedHashTable() = default;
EarlyCSE.cpp:llvm::ScopedHashTable<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::ScopedHashTable()
Line
Count
Source
169
1.11M
  ScopedHashTable() = default;
llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::ScopedHashTable()
Line
Count
Source
169
1.11M
  ScopedHashTable() = default;
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::ScopedHashTable()
Line
Count
Source
169
1.11M
  ScopedHashTable() = default;
170
  ScopedHashTable(AllocatorTy A) : Allocator(A) {}
171
  ScopedHashTable(const ScopedHashTable &) = delete;
172
  ScopedHashTable &operator=(const ScopedHashTable &) = delete;
173
174
4.47M
  ~ScopedHashTable() {
175
4.47M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
4.47M
  }
llvm::ScopedHashTable<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::~ScopedHashTable()
Line
Count
Source
174
1.95k
  ~ScopedHashTable() {
175
1.95k
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.95k
  }
llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::~ScopedHashTable()
Line
Count
Source
174
33.0k
  ~ScopedHashTable() {
175
33.0k
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
33.0k
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::~ScopedHashTable()
Line
Count
Source
174
1.11M
  ~ScopedHashTable() {
175
1.11M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.11M
  }
llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::~ScopedHashTable()
Line
Count
Source
174
1.11M
  ~ScopedHashTable() {
175
1.11M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.11M
  }
EarlyCSE.cpp:llvm::ScopedHashTable<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::~ScopedHashTable()
Line
Count
Source
174
1.11M
  ~ScopedHashTable() {
175
1.11M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.11M
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::~ScopedHashTable()
Line
Count
Source
174
1.11M
  ~ScopedHashTable() {
175
1.11M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.11M
  }
177
178
  /// Access to the allocator.
179
27.0M
  AllocatorTy &getAllocator() { return Allocator; }
llvm::ScopedHashTable<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::getAllocator()
Line
Count
Source
179
1.07k
  AllocatorTy &getAllocator() { return Allocator; }
llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::getAllocator()
Line
Count
Source
179
6.91M
  AllocatorTy &getAllocator() { return Allocator; }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::getAllocator()
Line
Count
Source
179
44.3k
  AllocatorTy &getAllocator() { return Allocator; }
llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::getAllocator()
Line
Count
Source
179
1.15k
  AllocatorTy &getAllocator() { return Allocator; }
EarlyCSE.cpp:llvm::ScopedHashTable<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::getAllocator()
Line
Count
Source
179
5.11M
  AllocatorTy &getAllocator() { return Allocator; }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::getAllocator()
Line
Count
Source
179
14.9M
  AllocatorTy &getAllocator() { return Allocator; }
180
  const AllocatorTy &getAllocator() const { return Allocator; }
181
182
  /// Return 1 if the specified key is in the table, 0 otherwise.
183
8.49M
  size_type count(const K &Key) const {
184
8.49M
    return TopLevelMap.count(Key);
185
8.49M
  }
llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::count(llvm::MachineInstr* const&) const
Line
Count
Source
183
7.84M
  size_type count(const K &Key) const {
184
7.84M
    return TopLevelMap.count(Key);
185
7.84M
  }
llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::count(llvm::MemoryLocation const&) const
Line
Count
Source
183
652k
  size_type count(const K &Key) const {
184
652k
    return TopLevelMap.count(Key);
185
652k
  }
186
187
19.2M
  V lookup(const K &Key) const {
188
19.2M
    auto I = TopLevelMap.find(Key);
189
19.2M
    if (I != TopLevelMap.end())
190
2.60M
      return I->second->getValue();
191
16.6M
192
16.6M
    return V();
193
16.6M
  }
llvm::ScopedHashTable<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::lookup(llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> const&) const
Line
Count
Source
187
2.41k
  V lookup(const K &Key) const {
188
2.41k
    auto I = TopLevelMap.find(Key);
189
2.41k
    if (I != TopLevelMap.end())
190
90
      return I->second->getValue();
191
2.32k
192
2.32k
    return V();
193
2.32k
  }
llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::lookup(llvm::MachineInstr* const&) const
Line
Count
Source
187
631k
  V lookup(const K &Key) const {
188
631k
    auto I = TopLevelMap.find(Key);
189
631k
    if (I != TopLevelMap.end())
190
631k
      return I->second->getValue();
191
0
192
0
    return V();
193
0
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::lookup((anonymous namespace)::SimpleValue const&) const
Line
Count
Source
187
13.2M
  V lookup(const K &Key) const {
188
13.2M
    auto I = TopLevelMap.find(Key);
189
13.2M
    if (I != TopLevelMap.end())
190
826k
      return I->second->getValue();
191
12.4M
192
12.4M
    return V();
193
12.4M
  }
EarlyCSE.cpp:llvm::ScopedHashTable<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::lookup(llvm::Value* const&) const
Line
Count
Source
187
5.30M
  V lookup(const K &Key) const {
188
5.30M
    auto I = TopLevelMap.find(Key);
189
5.30M
    if (I != TopLevelMap.end())
190
1.14M
      return I->second->getValue();
191
4.15M
192
4.15M
    return V();
193
4.15M
  }
llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::lookup(llvm::MemoryLocation const&) const
Line
Count
Source
187
36
  V lookup(const K &Key) const {
188
36
    auto I = TopLevelMap.find(Key);
189
36
    if (I != TopLevelMap.end())
190
36
      return I->second->getValue();
191
0
192
0
    return V();
193
0
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::lookup((anonymous namespace)::CallValue const&) const
Line
Count
Source
187
44.4k
  V lookup(const K &Key) const {
188
44.4k
    auto I = TopLevelMap.find(Key);
189
44.4k
    if (I != TopLevelMap.end())
190
2.03k
      return I->second->getValue();
191
42.3k
192
42.3k
    return V();
193
42.3k
  }
194
195
27.0M
  void insert(const K &Key, const V &Val) {
196
27.0M
    insertIntoScope(CurScope, Key, Val);
197
27.0M
  }
llvm::ScopedHashTable<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::insert(llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> const&, std::__1::pair<unsigned int, unsigned int> const&)
Line
Count
Source
195
1.07k
  void insert(const K &Key, const V &Val) {
196
1.07k
    insertIntoScope(CurScope, Key, Val);
197
1.07k
  }
llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::insert(llvm::MachineInstr* const&, unsigned int const&)
Line
Count
Source
195
6.91M
  void insert(const K &Key, const V &Val) {
196
6.91M
    insertIntoScope(CurScope, Key, Val);
197
6.91M
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::insert((anonymous namespace)::SimpleValue const&, llvm::Value* const&)
Line
Count
Source
195
14.9M
  void insert(const K &Key, const V &Val) {
196
14.9M
    insertIntoScope(CurScope, Key, Val);
197
14.9M
  }
llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::insert(llvm::MemoryLocation const&, unsigned int const&)
Line
Count
Source
195
1.15k
  void insert(const K &Key, const V &Val) {
196
1.15k
    insertIntoScope(CurScope, Key, Val);
197
1.15k
  }
EarlyCSE.cpp:llvm::ScopedHashTable<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::insert(llvm::Value* const&, (anonymous namespace)::EarlyCSE::LoadValue const&)
Line
Count
Source
195
5.11M
  void insert(const K &Key, const V &Val) {
196
5.11M
    insertIntoScope(CurScope, Key, Val);
197
5.11M
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::insert((anonymous namespace)::CallValue const&, std::__1::pair<llvm::Instruction*, unsigned int> const&)
Line
Count
Source
195
44.3k
  void insert(const K &Key, const V &Val) {
196
44.3k
    insertIntoScope(CurScope, Key, Val);
197
44.3k
  }
198
199
  using iterator = ScopedHashTableIterator<K, V, KInfo>;
200
201
  iterator end() { return iterator(0); }
202
203
  iterator begin(const K &Key) {
204
    typename DenseMap<K, ValTy*, KInfo>::iterator I =
205
      TopLevelMap.find(Key);
206
    if (I == TopLevelMap.end()) return end();
207
    return iterator(I->second);
208
  }
209
210
  ScopeTy *getCurScope() { return CurScope; }
211
  const ScopeTy *getCurScope() const { return CurScope; }
212
213
  /// insertIntoScope - This inserts the specified key/value at the specified
214
  /// (possibly not the current) scope.  While it is ok to insert into a scope
215
  /// that isn't the current one, it isn't ok to insert *underneath* an existing
216
  /// value of the specified key.
217
27.0M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
27.0M
    assert(S && "No scope active!");
219
27.0M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
27.0M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
27.0M
                             Allocator);
222
27.0M
    S->setLastValInScope(KeyEntry);
223
27.0M
  }
llvm::ScopedHashTable<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::insertIntoScope(llvm::ScopedHashTableScope<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >*, llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> const&, std::__1::pair<unsigned int, unsigned int> const&)
Line
Count
Source
217
1.07k
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
1.07k
    assert(S && "No scope active!");
219
1.07k
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
1.07k
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
1.07k
                             Allocator);
222
1.07k
    S->setLastValInScope(KeyEntry);
223
1.07k
  }
llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::insertIntoScope(llvm::ScopedHashTableScope<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >*, llvm::MachineInstr* const&, unsigned int const&)
Line
Count
Source
217
6.91M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
6.91M
    assert(S && "No scope active!");
219
6.91M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
6.91M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
6.91M
                             Allocator);
222
6.91M
    S->setLastValInScope(KeyEntry);
223
6.91M
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::insertIntoScope(llvm::ScopedHashTableScope<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >*, (anonymous namespace)::SimpleValue const&, llvm::Value* const&)
Line
Count
Source
217
14.9M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
14.9M
    assert(S && "No scope active!");
219
14.9M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
14.9M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
14.9M
                             Allocator);
222
14.9M
    S->setLastValInScope(KeyEntry);
223
14.9M
  }
llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::insertIntoScope(llvm::ScopedHashTableScope<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >*, llvm::MemoryLocation const&, unsigned int const&)
Line
Count
Source
217
1.15k
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
1.15k
    assert(S && "No scope active!");
219
1.15k
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
1.15k
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
1.15k
                             Allocator);
222
1.15k
    S->setLastValInScope(KeyEntry);
223
1.15k
  }
EarlyCSE.cpp:llvm::ScopedHashTable<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::insertIntoScope(llvm::ScopedHashTableScope<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >*, llvm::Value* const&, (anonymous namespace)::EarlyCSE::LoadValue const&)
Line
Count
Source
217
5.11M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
5.11M
    assert(S && "No scope active!");
219
5.11M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
5.11M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
5.11M
                             Allocator);
222
5.11M
    S->setLastValInScope(KeyEntry);
223
5.11M
  }
EarlyCSE.cpp:llvm::ScopedHashTable<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::insertIntoScope(llvm::ScopedHashTableScope<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>*, (anonymous namespace)::CallValue const&, std::__1::pair<llvm::Instruction*, unsigned int> const&)
Line
Count
Source
217
44.3k
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
44.3k
    assert(S && "No scope active!");
219
44.3k
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
44.3k
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
44.3k
                             Allocator);
222
44.3k
    S->setLastValInScope(KeyEntry);
223
44.3k
  }
224
};
225
226
/// ScopedHashTableScope ctor - Install this as the current scope for the hash
227
/// table.
228
template <typename K, typename V, typename KInfo, typename Allocator>
229
ScopedHashTableScope<K, V, KInfo, Allocator>::
230
23.7M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
23.7M
  PrevScope = HT.CurScope;
232
23.7M
  HT.CurScope = this;
233
23.7M
  LastValInScope = nullptr;
234
23.7M
}
llvm::ScopedHashTableScope<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::ScopedHashTableScope(llvm::ScopedHashTable<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >&)
Line
Count
Source
230
14.1k
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
14.1k
  PrevScope = HT.CurScope;
232
14.1k
  HT.CurScope = this;
233
14.1k
  LastValInScope = nullptr;
234
14.1k
}
llvm::ScopedHashTableScope<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::ScopedHashTableScope(llvm::ScopedHashTable<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >&)
Line
Count
Source
230
2.62M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
2.62M
  PrevScope = HT.CurScope;
232
2.62M
  HT.CurScope = this;
233
2.62M
  LastValInScope = nullptr;
234
2.62M
}
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::ScopedHashTableScope(llvm::ScopedHashTable<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >&)
Line
Count
Source
230
5.27M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.27M
  PrevScope = HT.CurScope;
232
5.27M
  HT.CurScope = this;
233
5.27M
  LastValInScope = nullptr;
234
5.27M
}
EarlyCSE.cpp:llvm::ScopedHashTableScope<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::ScopedHashTableScope(llvm::ScopedHashTable<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >&)
Line
Count
Source
230
5.27M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.27M
  PrevScope = HT.CurScope;
232
5.27M
  HT.CurScope = this;
233
5.27M
  LastValInScope = nullptr;
234
5.27M
}
llvm::ScopedHashTableScope<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::ScopedHashTableScope(llvm::ScopedHashTable<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >&)
Line
Count
Source
230
5.27M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.27M
  PrevScope = HT.CurScope;
232
5.27M
  HT.CurScope = this;
233
5.27M
  LastValInScope = nullptr;
234
5.27M
}
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::ScopedHashTableScope(llvm::ScopedHashTable<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>&)
Line
Count
Source
230
5.27M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.27M
  PrevScope = HT.CurScope;
232
5.27M
  HT.CurScope = this;
233
5.27M
  LastValInScope = nullptr;
234
5.27M
}
235
236
template <typename K, typename V, typename KInfo, typename Allocator>
237
23.7M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
23.7M
  assert(HT.CurScope == this && "Scope imbalance!");
239
23.7M
  HT.CurScope = PrevScope;
240
23.7M
241
23.7M
  // Pop and delete all values corresponding to this scope.
242
50.7M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
27.0M
    // Pop this value out of the TopLevelMap.
244
27.0M
    if (!ThisEntry->getNextForKey()) {
245
22.9M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
22.9M
             "Scope imbalance!");
247
22.9M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
22.9M
    } else {
249
4.08M
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
4.08M
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
4.08M
      KeyEntry = ThisEntry->getNextForKey();
252
4.08M
    }
253
27.0M
254
27.0M
    // Pop this value out of the scope.
255
27.0M
    LastValInScope = ThisEntry->getNextInScope();
256
27.0M
257
27.0M
    // Delete this entry.
258
27.0M
    ThisEntry->Destroy(HT.getAllocator());
259
27.0M
  }
260
23.7M
}
llvm::ScopedHashTableScope<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int>, llvm::DenseMapInfo<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> >, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*>, std::__1::pair<unsigned int, unsigned int> >, 32ul, 8ul> >::~ScopedHashTableScope()
Line
Count
Source
237
14.1k
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
14.1k
  assert(HT.CurScope == this && "Scope imbalance!");
239
14.1k
  HT.CurScope = PrevScope;
240
14.1k
241
14.1k
  // Pop and delete all values corresponding to this scope.
242
15.1k
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
1.07k
    // Pop this value out of the TopLevelMap.
244
1.07k
    if (!ThisEntry->getNextForKey()) {
245
1.03k
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
1.03k
             "Scope imbalance!");
247
1.03k
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
1.03k
    } else {
249
44
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
44
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
44
      KeyEntry = ThisEntry->getNextForKey();
252
44
    }
253
1.07k
254
1.07k
    // Pop this value out of the scope.
255
1.07k
    LastValInScope = ThisEntry->getNextInScope();
256
1.07k
257
1.07k
    // Delete this entry.
258
1.07k
    ThisEntry->Destroy(HT.getAllocator());
259
1.07k
  }
260
14.1k
}
llvm::ScopedHashTableScope<llvm::MachineInstr*, unsigned int, llvm::MachineInstrExpressionTrait, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>, 32ul, 8ul> >::~ScopedHashTableScope()
Line
Count
Source
237
2.62M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
2.62M
  assert(HT.CurScope == this && "Scope imbalance!");
239
2.62M
  HT.CurScope = PrevScope;
240
2.62M
241
2.62M
  // Pop and delete all values corresponding to this scope.
242
9.54M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
6.91M
    // Pop this value out of the TopLevelMap.
244
6.91M
    if (!ThisEntry->getNextForKey()) {
245
6.26M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
6.26M
             "Scope imbalance!");
247
6.26M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
6.26M
    } else {
249
648k
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
648k
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
648k
      KeyEntry = ThisEntry->getNextForKey();
252
648k
    }
253
6.91M
254
6.91M
    // Pop this value out of the scope.
255
6.91M
    LastValInScope = ThisEntry->getNextInScope();
256
6.91M
257
6.91M
    // Delete this entry.
258
6.91M
    ThisEntry->Destroy(HT.getAllocator());
259
6.91M
  }
260
2.62M
}
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int>, llvm::DenseMapInfo<(anonymous namespace)::CallValue>, llvm::MallocAllocator>::~ScopedHashTableScope()
Line
Count
Source
237
5.27M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.27M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.27M
  HT.CurScope = PrevScope;
240
5.27M
241
5.27M
  // Pop and delete all values corresponding to this scope.
242
5.31M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
44.3k
    // Pop this value out of the TopLevelMap.
244
44.3k
    if (!ThisEntry->getNextForKey()) {
245
42.3k
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
42.3k
             "Scope imbalance!");
247
42.3k
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
42.3k
    } else {
249
1.93k
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
1.93k
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
1.93k
      KeyEntry = ThisEntry->getNextForKey();
252
1.93k
    }
253
44.3k
254
44.3k
    // Pop this value out of the scope.
255
44.3k
    LastValInScope = ThisEntry->getNextInScope();
256
44.3k
257
44.3k
    // Delete this entry.
258
44.3k
    ThisEntry->Destroy(HT.getAllocator());
259
44.3k
  }
260
5.27M
}
llvm::ScopedHashTableScope<llvm::MemoryLocation, unsigned int, llvm::DenseMapInfo<llvm::MemoryLocation>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::MemoryLocation, unsigned int>, 64ul, 8ul> >::~ScopedHashTableScope()
Line
Count
Source
237
5.27M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.27M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.27M
  HT.CurScope = PrevScope;
240
5.27M
241
5.27M
  // Pop and delete all values corresponding to this scope.
242
5.27M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
1.15k
    // Pop this value out of the TopLevelMap.
244
1.15k
    if (!ThisEntry->getNextForKey()) {
245
1.15k
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
1.15k
             "Scope imbalance!");
247
1.15k
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
1.15k
    } else {
249
0
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
0
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
0
      KeyEntry = ThisEntry->getNextForKey();
252
0
    }
253
1.15k
254
1.15k
    // Pop this value out of the scope.
255
1.15k
    LastValInScope = ThisEntry->getNextInScope();
256
1.15k
257
1.15k
    // Delete this entry.
258
1.15k
    ThisEntry->Destroy(HT.getAllocator());
259
1.15k
  }
260
5.27M
}
EarlyCSE.cpp:llvm::ScopedHashTableScope<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue, llvm::DenseMapInfo<llvm::Value*>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>, 48ul, 8ul> >::~ScopedHashTableScope()
Line
Count
Source
237
5.27M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.27M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.27M
  HT.CurScope = PrevScope;
240
5.27M
241
5.27M
  // Pop and delete all values corresponding to this scope.
242
10.3M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
5.11M
    // Pop this value out of the TopLevelMap.
244
5.11M
    if (!ThisEntry->getNextForKey()) {
245
4.15M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
4.15M
             "Scope imbalance!");
247
4.15M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
4.15M
    } else {
249
957k
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
957k
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
957k
      KeyEntry = ThisEntry->getNextForKey();
252
957k
    }
253
5.11M
254
5.11M
    // Pop this value out of the scope.
255
5.11M
    LastValInScope = ThisEntry->getNextInScope();
256
5.11M
257
5.11M
    // Delete this entry.
258
5.11M
    ThisEntry->Destroy(HT.getAllocator());
259
5.11M
  }
260
5.27M
}
EarlyCSE.cpp:llvm::ScopedHashTableScope<(anonymous namespace)::SimpleValue, llvm::Value*, llvm::DenseMapInfo<(anonymous namespace)::SimpleValue>, llvm::RecyclingAllocator<llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>, llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>, 32ul, 8ul> >::~ScopedHashTableScope()
Line
Count
Source
237
5.27M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.27M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.27M
  HT.CurScope = PrevScope;
240
5.27M
241
5.27M
  // Pop and delete all values corresponding to this scope.
242
20.2M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
14.9M
    // Pop this value out of the TopLevelMap.
244
14.9M
    if (!ThisEntry->getNextForKey()) {
245
12.4M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
12.4M
             "Scope imbalance!");
247
12.4M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
12.4M
    } else {
249
2.47M
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
2.47M
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
2.47M
      KeyEntry = ThisEntry->getNextForKey();
252
2.47M
    }
253
14.9M
254
14.9M
    // Pop this value out of the scope.
255
14.9M
    LastValInScope = ThisEntry->getNextInScope();
256
14.9M
257
14.9M
    // Delete this entry.
258
14.9M
    ThisEntry->Destroy(HT.getAllocator());
259
14.9M
  }
260
5.27M
}
261
262
} // end namespace llvm
263
264
#endif // LLVM_ADT_SCOPEDHASHTABLE_H