Coverage Report

Created: 2018-07-20 23:04

/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
26.1M
  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.76M
  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.4M
  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
4.90M
  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
42.0k
  ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {}
54
55
public:
56
26.1M
  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.76M
  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
42.0k
  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
4.90M
  const K &getKey() const { return Key; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getKey() const
Line
Count
Source
56
14.4M
  const K &getKey() const { return Key; }
57
  const V &getValue() const { return Val; }
58
2.48M
  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
616k
  V &getValue() { return Val; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getValue()
Line
Count
Source
58
771k
  V &getValue() { return Val; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<llvm::Value*, (anonymous namespace)::EarlyCSE::LoadValue>::getValue()
Line
Count
Source
58
1.09M
  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
1.92k
  V &getValue() { return Val; }
59
60
30.1M
  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.11k
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
llvm::ScopedHashTableVal<llvm::MachineInstr*, unsigned int>::getNextForKey()
Line
Count
Source
60
7.40M
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::getNextForKey()
Line
Count
Source
60
43.8k
  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
5.82M
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getNextForKey()
Line
Count
Source
60
16.8M
  ScopedHashTableVal *getNextForKey() { return NextForKey; }
61
  const ScopedHashTableVal *getNextForKey() const { return NextForKey; }
62
26.1M
  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.76M
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::getNextInScope()
Line
Count
Source
62
42.0k
  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
4.90M
  ScopedHashTableVal *getNextInScope() { return NextInScope; }
EarlyCSE.cpp:llvm::ScopedHashTableVal<(anonymous namespace)::SimpleValue, llvm::Value*>::getNextInScope()
Line
Count
Source
62
14.4M
  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
26.1M
                                    AllocatorTy &Allocator) {
69
26.1M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
26.1M
    // Set up the value.
71
26.1M
    new (New) ScopedHashTableVal(key, val);
72
26.1M
    New->NextInScope = nextInScope;
73
26.1M
    New->NextForKey = nextForKey;
74
26.1M
    return New;
75
26.1M
  }
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.76M
                                    AllocatorTy &Allocator) {
69
6.76M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
6.76M
    // Set up the value.
71
6.76M
    new (New) ScopedHashTableVal(key, val);
72
6.76M
    New->NextInScope = nextInScope;
73
6.76M
    New->NextForKey = nextForKey;
74
6.76M
    return New;
75
6.76M
  }
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.4M
                                    AllocatorTy &Allocator) {
69
14.4M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
14.4M
    // Set up the value.
71
14.4M
    new (New) ScopedHashTableVal(key, val);
72
14.4M
    New->NextInScope = nextInScope;
73
14.4M
    New->NextForKey = nextForKey;
74
14.4M
    return New;
75
14.4M
  }
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
4.90M
                                    AllocatorTy &Allocator) {
69
4.90M
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
4.90M
    // Set up the value.
71
4.90M
    new (New) ScopedHashTableVal(key, val);
72
4.90M
    New->NextInScope = nextInScope;
73
4.90M
    New->NextForKey = nextForKey;
74
4.90M
    return New;
75
4.90M
  }
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
42.0k
                                    AllocatorTy &Allocator) {
69
42.0k
    ScopedHashTableVal *New = Allocator.template Allocate<ScopedHashTableVal>();
70
42.0k
    // Set up the value.
71
42.0k
    new (New) ScopedHashTableVal(key, val);
72
42.0k
    New->NextInScope = nextInScope;
73
42.0k
    New->NextForKey = nextForKey;
74
42.0k
    return New;
75
42.0k
  }
76
77
26.1M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
26.1M
    // Free memory referenced by the item.
79
26.1M
    this->~ScopedHashTableVal();
80
26.1M
    Allocator.Deallocate(this);
81
26.1M
  }
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.76M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
6.76M
    // Free memory referenced by the item.
79
6.76M
    this->~ScopedHashTableVal();
80
6.76M
    Allocator.Deallocate(this);
81
6.76M
  }
EarlyCSE.cpp:void llvm::ScopedHashTableVal<(anonymous namespace)::CallValue, std::__1::pair<llvm::Instruction*, unsigned int> >::Destroy<llvm::MallocAllocator>(llvm::MallocAllocator&)
Line
Count
Source
77
42.0k
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
42.0k
    // Free memory referenced by the item.
79
42.0k
    this->~ScopedHashTableVal();
80
42.0k
    Allocator.Deallocate(this);
81
42.0k
  }
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
4.90M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
4.90M
    // Free memory referenced by the item.
79
4.90M
    this->~ScopedHashTableVal();
80
4.90M
    Allocator.Deallocate(this);
81
4.90M
  }
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.4M
  template <typename AllocatorTy> void Destroy(AllocatorTy &Allocator) {
78
14.4M
    // Free memory referenced by the item.
79
14.4M
    this->~ScopedHashTableVal();
80
14.4M
    Allocator.Deallocate(this);
81
14.4M
  }
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
26.1M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
26.1M
    return LastValInScope;
111
26.1M
  }
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.76M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
6.76M
    return LastValInScope;
111
6.76M
  }
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.4M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
14.4M
    return LastValInScope;
111
14.4M
  }
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
4.90M
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
4.90M
    return LastValInScope;
111
4.90M
  }
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
42.0k
  ScopedHashTableVal<K, V> *getLastValInScope() {
110
42.0k
    return LastValInScope;
111
42.0k
  }
112
113
26.1M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
26.1M
    LastValInScope = Val;
115
26.1M
  }
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.76M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
6.76M
    LastValInScope = Val;
115
6.76M
  }
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.4M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
14.4M
    LastValInScope = Val;
115
14.4M
  }
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
4.90M
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
4.90M
    LastValInScope = Val;
115
4.90M
  }
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
42.0k
  void setLastValInScope(ScopedHashTableVal<K, V> *Val) {
114
42.0k
    LastValInScope = Val;
115
42.0k
  }
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.28M
  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.91k
  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
32.5k
  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.06M
  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.06M
  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.06M
  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.06M
  ScopedHashTable() = default;
170
  ScopedHashTable(AllocatorTy A) : Allocator(A) {}
171
  ScopedHashTable(const ScopedHashTable &) = delete;
172
  ScopedHashTable &operator=(const ScopedHashTable &) = delete;
173
174
4.28M
  ~ScopedHashTable() {
175
4.28M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
4.28M
  }
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.91k
  ~ScopedHashTable() {
175
1.91k
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.91k
  }
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
32.4k
  ~ScopedHashTable() {
175
32.4k
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
32.4k
  }
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.06M
  ~ScopedHashTable() {
175
1.06M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.06M
  }
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.06M
  ~ScopedHashTable() {
175
1.06M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.06M
  }
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.06M
  ~ScopedHashTable() {
175
1.06M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.06M
  }
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.06M
  ~ScopedHashTable() {
175
1.06M
    assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!");
176
1.06M
  }
177
178
  /// Access to the allocator.
179
26.1M
  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.76M
  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
42.0k
  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
4.90M
  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.4M
  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.28M
  size_type count(const K &Key) const {
184
8.28M
    return TopLevelMap.count(Key);
185
8.28M
  }
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.65M
  size_type count(const K &Key) const {
184
7.65M
    return TopLevelMap.count(Key);
185
7.65M
  }
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
625k
  size_type count(const K &Key) const {
184
625k
    return TopLevelMap.count(Key);
185
625k
  }
186
187
18.5M
  V lookup(const K &Key) const {
188
18.5M
    auto I = TopLevelMap.find(Key);
189
18.5M
    if (I != TopLevelMap.end())
190
2.48M
      return I->second->getValue();
191
16.0M
192
16.0M
    return V();
193
16.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> >::lookup(llvm::PointerUnion<llvm::Value const*, llvm::PseudoSourceValue const*> const&) const
Line
Count
Source
187
2.40k
  V lookup(const K &Key) const {
188
2.40k
    auto I = TopLevelMap.find(Key);
189
2.40k
    if (I != TopLevelMap.end())
190
90
      return I->second->getValue();
191
2.31k
192
2.31k
    return V();
193
2.31k
  }
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
616k
  V lookup(const K &Key) const {
188
616k
    auto I = TopLevelMap.find(Key);
189
616k
    if (I != TopLevelMap.end())
190
616k
      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
12.7M
  V lookup(const K &Key) const {
188
12.7M
    auto I = TopLevelMap.find(Key);
189
12.7M
    if (I != TopLevelMap.end())
190
771k
      return I->second->getValue();
191
11.9M
192
11.9M
    return V();
193
11.9M
  }
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.08M
  V lookup(const K &Key) const {
188
5.08M
    auto I = TopLevelMap.find(Key);
189
5.08M
    if (I != TopLevelMap.end())
190
1.09M
      return I->second->getValue();
191
3.98M
192
3.98M
    return V();
193
3.98M
  }
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
42.1k
  V lookup(const K &Key) const {
188
42.1k
    auto I = TopLevelMap.find(Key);
189
42.1k
    if (I != TopLevelMap.end())
190
1.92k
      return I->second->getValue();
191
40.2k
192
40.2k
    return V();
193
40.2k
  }
194
195
26.1M
  void insert(const K &Key, const V &Val) {
196
26.1M
    insertIntoScope(CurScope, Key, Val);
197
26.1M
  }
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.76M
  void insert(const K &Key, const V &Val) {
196
6.76M
    insertIntoScope(CurScope, Key, Val);
197
6.76M
  }
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.4M
  void insert(const K &Key, const V &Val) {
196
14.4M
    insertIntoScope(CurScope, Key, Val);
197
14.4M
  }
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
4.90M
  void insert(const K &Key, const V &Val) {
196
4.90M
    insertIntoScope(CurScope, Key, Val);
197
4.90M
  }
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
42.0k
  void insert(const K &Key, const V &Val) {
196
42.0k
    insertIntoScope(CurScope, Key, Val);
197
42.0k
  }
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
26.1M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
26.1M
    assert(S && "No scope active!");
219
26.1M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
26.1M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
26.1M
                             Allocator);
222
26.1M
    S->setLastValInScope(KeyEntry);
223
26.1M
  }
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.76M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
6.76M
    assert(S && "No scope active!");
219
6.76M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
6.76M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
6.76M
                             Allocator);
222
6.76M
    S->setLastValInScope(KeyEntry);
223
6.76M
  }
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.4M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
14.4M
    assert(S && "No scope active!");
219
14.4M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
14.4M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
14.4M
                             Allocator);
222
14.4M
    S->setLastValInScope(KeyEntry);
223
14.4M
  }
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
4.90M
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
4.90M
    assert(S && "No scope active!");
219
4.90M
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
4.90M
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
4.90M
                             Allocator);
222
4.90M
    S->setLastValInScope(KeyEntry);
223
4.90M
  }
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
42.0k
  void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) {
218
42.0k
    assert(S && "No scope active!");
219
42.0k
    ScopedHashTableVal<K, V> *&KeyEntry = TopLevelMap[Key];
220
42.0k
    KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val,
221
42.0k
                             Allocator);
222
42.0k
    S->setLastValInScope(KeyEntry);
223
42.0k
  }
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.0M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
23.0M
  PrevScope = HT.CurScope;
232
23.0M
  HT.CurScope = this;
233
23.0M
  LastValInScope = nullptr;
234
23.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> >::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
13.9k
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
13.9k
  PrevScope = HT.CurScope;
232
13.9k
  HT.CurScope = this;
233
13.9k
  LastValInScope = nullptr;
234
13.9k
}
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.56M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
2.56M
  PrevScope = HT.CurScope;
232
2.56M
  HT.CurScope = this;
233
2.56M
  LastValInScope = nullptr;
234
2.56M
}
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.11M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.11M
  PrevScope = HT.CurScope;
232
5.11M
  HT.CurScope = this;
233
5.11M
  LastValInScope = nullptr;
234
5.11M
}
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.11M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.11M
  PrevScope = HT.CurScope;
232
5.11M
  HT.CurScope = this;
233
5.11M
  LastValInScope = nullptr;
234
5.11M
}
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.11M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.11M
  PrevScope = HT.CurScope;
232
5.11M
  HT.CurScope = this;
233
5.11M
  LastValInScope = nullptr;
234
5.11M
}
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.11M
  ScopedHashTableScope(ScopedHashTable<K, V, KInfo, Allocator> &ht) : HT(ht) {
231
5.11M
  PrevScope = HT.CurScope;
232
5.11M
  HT.CurScope = this;
233
5.11M
  LastValInScope = nullptr;
234
5.11M
}
235
236
template <typename K, typename V, typename KInfo, typename Allocator>
237
23.0M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
23.0M
  assert(HT.CurScope == this && "Scope imbalance!");
239
23.0M
  HT.CurScope = PrevScope;
240
23.0M
241
23.0M
  // Pop and delete all values corresponding to this scope.
242
49.1M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
26.1M
    // Pop this value out of the TopLevelMap.
244
26.1M
    if (!ThisEntry->getNextForKey()) {
245
22.1M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
22.1M
             "Scope imbalance!");
247
22.1M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
22.1M
    } else {
249
3.99M
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
3.99M
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
3.99M
      KeyEntry = ThisEntry->getNextForKey();
252
3.99M
    }
253
26.1M
254
26.1M
    // Pop this value out of the scope.
255
26.1M
    LastValInScope = ThisEntry->getNextInScope();
256
26.1M
257
26.1M
    // Delete this entry.
258
26.1M
    ThisEntry->Destroy(HT.getAllocator());
259
26.1M
  }
260
23.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> >::~ScopedHashTableScope()
Line
Count
Source
237
13.9k
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
13.9k
  assert(HT.CurScope == this && "Scope imbalance!");
239
13.9k
  HT.CurScope = PrevScope;
240
13.9k
241
13.9k
  // Pop and delete all values corresponding to this scope.
242
15.0k
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
1.07k
    // Pop this value out of the TopLevelMap.
244
1.07k
    if (!ThisEntry->getNextForKey()) {
245
1.02k
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
1.02k
             "Scope imbalance!");
247
1.02k
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
1.02k
    } 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
13.9k
}
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.56M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
2.56M
  assert(HT.CurScope == this && "Scope imbalance!");
239
2.56M
  HT.CurScope = PrevScope;
240
2.56M
241
2.56M
  // Pop and delete all values corresponding to this scope.
242
9.32M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
6.76M
    // Pop this value out of the TopLevelMap.
244
6.76M
    if (!ThisEntry->getNextForKey()) {
245
6.12M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
6.12M
             "Scope imbalance!");
247
6.12M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
6.12M
    } else {
249
636k
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
636k
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
636k
      KeyEntry = ThisEntry->getNextForKey();
252
636k
    }
253
6.76M
254
6.76M
    // Pop this value out of the scope.
255
6.76M
    LastValInScope = ThisEntry->getNextInScope();
256
6.76M
257
6.76M
    // Delete this entry.
258
6.76M
    ThisEntry->Destroy(HT.getAllocator());
259
6.76M
  }
260
2.56M
}
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.11M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.11M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.11M
  HT.CurScope = PrevScope;
240
5.11M
241
5.11M
  // Pop and delete all values corresponding to this scope.
242
5.15M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
42.0k
    // Pop this value out of the TopLevelMap.
244
42.0k
    if (!ThisEntry->getNextForKey()) {
245
40.2k
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
40.2k
             "Scope imbalance!");
247
40.2k
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
40.2k
    } else {
249
1.82k
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
1.82k
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
1.82k
      KeyEntry = ThisEntry->getNextForKey();
252
1.82k
    }
253
42.0k
254
42.0k
    // Pop this value out of the scope.
255
42.0k
    LastValInScope = ThisEntry->getNextInScope();
256
42.0k
257
42.0k
    // Delete this entry.
258
42.0k
    ThisEntry->Destroy(HT.getAllocator());
259
42.0k
  }
260
5.11M
}
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.11M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.11M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.11M
  HT.CurScope = PrevScope;
240
5.11M
241
5.11M
  // Pop and delete all values corresponding to this scope.
242
5.11M
  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.11M
}
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.11M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.11M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.11M
  HT.CurScope = PrevScope;
240
5.11M
241
5.11M
  // Pop and delete all values corresponding to this scope.
242
10.0M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
4.90M
    // Pop this value out of the TopLevelMap.
244
4.90M
    if (!ThisEntry->getNextForKey()) {
245
3.98M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
3.98M
             "Scope imbalance!");
247
3.98M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
3.98M
    } else {
249
921k
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
921k
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
921k
      KeyEntry = ThisEntry->getNextForKey();
252
921k
    }
253
4.90M
254
4.90M
    // Pop this value out of the scope.
255
4.90M
    LastValInScope = ThisEntry->getNextInScope();
256
4.90M
257
4.90M
    // Delete this entry.
258
4.90M
    ThisEntry->Destroy(HT.getAllocator());
259
4.90M
  }
260
5.11M
}
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.11M
ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
238
5.11M
  assert(HT.CurScope == this && "Scope imbalance!");
239
5.11M
  HT.CurScope = PrevScope;
240
5.11M
241
5.11M
  // Pop and delete all values corresponding to this scope.
242
19.5M
  while (ScopedHashTableVal<K, V> *ThisEntry = LastValInScope) {
243
14.4M
    // Pop this value out of the TopLevelMap.
244
14.4M
    if (!ThisEntry->getNextForKey()) {
245
11.9M
      assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&
246
11.9M
             "Scope imbalance!");
247
11.9M
      HT.TopLevelMap.erase(ThisEntry->getKey());
248
11.9M
    } else {
249
2.43M
      ScopedHashTableVal<K, V> *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()];
250
2.43M
      assert(KeyEntry == ThisEntry && "Scope imbalance!");
251
2.43M
      KeyEntry = ThisEntry->getNextForKey();
252
2.43M
    }
253
14.4M
254
14.4M
    // Pop this value out of the scope.
255
14.4M
    LastValInScope = ThisEntry->getNextInScope();
256
14.4M
257
14.4M
    // Delete this entry.
258
14.4M
    ThisEntry->Destroy(HT.getAllocator());
259
14.4M
  }
260
5.11M
}
261
262
} // end namespace llvm
263
264
#endif // LLVM_ADT_SCOPEDHASHTABLE_H