Coverage Report

Created: 2019-02-15 18:59

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