Coverage Report

Created: 2019-02-15 18:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/ADT/PriorityWorklist.h
Line
Count
Source (jump to first uncovered line)
1
//===- PriorityWorklist.h - Worklist with insertion priority ----*- 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
/// \file
10
///
11
/// This file provides a priority worklist. See the class comments for details.
12
///
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_ADT_PRIORITYWORKLIST_H
16
#define LLVM_ADT_PRIORITYWORKLIST_H
17
18
#include "llvm/ADT/DenseMap.h"
19
#include "llvm/ADT/STLExtras.h"
20
#include "llvm/ADT/SmallVector.h"
21
#include "llvm/Support/Compiler.h"
22
#include <algorithm>
23
#include <cassert>
24
#include <cstddef>
25
#include <iterator>
26
#include <type_traits>
27
#include <vector>
28
29
namespace llvm {
30
31
/// A FILO worklist that prioritizes on re-insertion without duplication.
32
///
33
/// This is very similar to a \c SetVector with the primary difference that
34
/// while re-insertion does not create a duplicate, it does adjust the
35
/// visitation order to respect the last insertion point. This can be useful
36
/// when the visit order needs to be prioritized based on insertion point
37
/// without actually having duplicate visits.
38
///
39
/// Note that this doesn't prevent re-insertion of elements which have been
40
/// visited -- if you need to break cycles, a set will still be necessary.
41
///
42
/// The type \c T must be default constructable to a null value that will be
43
/// ignored. It is an error to insert such a value, and popping elements will
44
/// never produce such a value. It is expected to be used with common nullable
45
/// types like pointers or optionals.
46
///
47
/// Internally this uses a vector to store the worklist and a map to identify
48
/// existing elements in the worklist. Both of these may be customized, but the
49
/// map must support the basic DenseMap API for mapping from a T to an integer
50
/// index into the vector.
51
///
52
/// A partial specialization is provided to automatically select a SmallVector
53
/// and a SmallDenseMap if custom data structures are not provided.
54
template <typename T, typename VectorT = std::vector<T>,
55
          typename MapT = DenseMap<T, ptrdiff_t>>
56
class PriorityWorklist {
57
public:
58
  using value_type = T;
59
  using key_type = T;
60
  using reference = T&;
61
  using const_reference = const T&;
62
  using size_type = typename MapT::size_type;
63
64
  /// Construct an empty PriorityWorklist
65
1.79k
  PriorityWorklist() = default;
Unexecuted instantiation: llvm::PriorityWorklist<llvm::Region*, llvm::SmallVector<llvm::Region*, 4u>, llvm::SmallDenseMap<llvm::Region*, long, 4u, llvm::DenseMapInfo<llvm::Region*>, llvm::detail::DenseMapPair<llvm::Region*, long> > >::PriorityWorklist()
llvm::PriorityWorklist<llvm::Loop*, llvm::SmallVector<llvm::Loop*, 4u>, llvm::SmallDenseMap<llvm::Loop*, long, 4u, llvm::DenseMapInfo<llvm::Loop*>, llvm::detail::DenseMapPair<llvm::Loop*, long> > >::PriorityWorklist()
Line
Count
Source
65
1.10k
  PriorityWorklist() = default;
llvm::PriorityWorklist<llvm::LazyCallGraph::RefSCC*, llvm::SmallVector<llvm::LazyCallGraph::RefSCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::RefSCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::RefSCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::RefSCC*, long> > >::PriorityWorklist()
Line
Count
Source
65
344
  PriorityWorklist() = default;
llvm::PriorityWorklist<llvm::LazyCallGraph::SCC*, llvm::SmallVector<llvm::LazyCallGraph::SCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::SCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::SCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::SCC*, long> > >::PriorityWorklist()
Line
Count
Source
65
344
  PriorityWorklist() = default;
66
67
  /// Determine if the PriorityWorklist is empty or not.
68
5.76k
  bool empty() const {
69
5.76k
    return V.empty();
70
5.76k
  }
Unexecuted instantiation: llvm::PriorityWorklist<llvm::Region*, llvm::SmallVector<llvm::Region*, 4u>, llvm::SmallDenseMap<llvm::Region*, long, 4u, llvm::DenseMapInfo<llvm::Region*>, llvm::detail::DenseMapPair<llvm::Region*, long> > >::empty() const
llvm::PriorityWorklist<llvm::Loop*, llvm::SmallVector<llvm::Loop*, 4u>, llvm::SmallDenseMap<llvm::Loop*, long, 4u, llvm::DenseMapInfo<llvm::Loop*>, llvm::detail::DenseMapPair<llvm::Loop*, long> > >::empty() const
Line
Count
Source
68
3.56k
  bool empty() const {
69
3.56k
    return V.empty();
70
3.56k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::SCC*, llvm::SmallVector<llvm::LazyCallGraph::SCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::SCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::SCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::SCC*, long> > >::empty() const
Line
Count
Source
68
1.13k
  bool empty() const {
69
1.13k
    return V.empty();
70
1.13k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::RefSCC*, llvm::SmallVector<llvm::LazyCallGraph::RefSCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::RefSCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::RefSCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::RefSCC*, long> > >::empty() const
Line
Count
Source
68
1.06k
  bool empty() const {
69
1.06k
    return V.empty();
70
1.06k
  }
71
72
  /// Returns the number of elements in the worklist.
73
  size_type size() const {
74
    return M.size();
75
  }
76
77
  /// Count the number of elements of a given key in the PriorityWorklist.
78
  /// \returns 0 if the element is not in the PriorityWorklist, 1 if it is.
79
262
  size_type count(const key_type &key) const {
80
262
    return M.count(key);
81
262
  }
82
83
  /// Return the last element of the PriorityWorklist.
84
11.5k
  const T &back() const {
85
11.5k
    assert(!empty() && "Cannot call back() on empty PriorityWorklist!");
86
11.5k
    return V.back();
87
11.5k
  }
Unexecuted instantiation: llvm::PriorityWorklist<llvm::Region*, llvm::SmallVector<llvm::Region*, 4u>, llvm::SmallDenseMap<llvm::Region*, long, 4u, llvm::DenseMapInfo<llvm::Region*>, llvm::detail::DenseMapPair<llvm::Region*, long> > >::back() const
llvm::PriorityWorklist<llvm::Loop*, llvm::SmallVector<llvm::Loop*, 4u>, llvm::SmallDenseMap<llvm::Loop*, long, 4u, llvm::DenseMapInfo<llvm::Loop*>, llvm::detail::DenseMapPair<llvm::Loop*, long> > >::back() const
Line
Count
Source
84
7.13k
  const T &back() const {
85
7.13k
    assert(!empty() && "Cannot call back() on empty PriorityWorklist!");
86
7.13k
    return V.back();
87
7.13k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::RefSCC*, llvm::SmallVector<llvm::LazyCallGraph::RefSCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::RefSCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::RefSCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::RefSCC*, long> > >::back() const
Line
Count
Source
84
2.13k
  const T &back() const {
85
2.13k
    assert(!empty() && "Cannot call back() on empty PriorityWorklist!");
86
2.13k
    return V.back();
87
2.13k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::SCC*, llvm::SmallVector<llvm::LazyCallGraph::SCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::SCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::SCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::SCC*, long> > >::back() const
Line
Count
Source
84
2.26k
  const T &back() const {
85
2.26k
    assert(!empty() && "Cannot call back() on empty PriorityWorklist!");
86
2.26k
    return V.back();
87
2.26k
  }
88
89
  /// Insert a new element into the PriorityWorklist.
90
  /// \returns true if the element was inserted into the PriorityWorklist.
91
2.89k
  bool insert(const T &X) {
92
2.89k
    assert(X != T() && "Cannot insert a null (default constructed) value!");
93
2.89k
    auto InsertResult = M.insert({X, V.size()});
94
2.89k
    if (InsertResult.second) {
95
2.88k
      // Fresh value, just append it to the vector.
96
2.88k
      V.push_back(X);
97
2.88k
      return true;
98
2.88k
    }
99
10
100
10
    auto &Index = InsertResult.first->second;
101
10
    assert(V[Index] == X && "Value not actually at index in map!");
102
10
    if (Index != (ptrdiff_t)(V.size() - 1)) {
103
4
      // If the element isn't at the back, null it out and append a fresh one.
104
4
      V[Index] = T();
105
4
      Index = (ptrdiff_t)V.size();
106
4
      V.push_back(X);
107
4
    }
108
10
    return false;
109
10
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::RefSCC*, llvm::SmallVector<llvm::LazyCallGraph::RefSCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::RefSCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::RefSCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::RefSCC*, long> > >::insert(llvm::LazyCallGraph::RefSCC* const&)
Line
Count
Source
91
1.06k
  bool insert(const T &X) {
92
1.06k
    assert(X != T() && "Cannot insert a null (default constructed) value!");
93
1.06k
    auto InsertResult = M.insert({X, V.size()});
94
1.06k
    if (InsertResult.second) {
95
1.06k
      // Fresh value, just append it to the vector.
96
1.06k
      V.push_back(X);
97
1.06k
      return true;
98
1.06k
    }
99
0
100
0
    auto &Index = InsertResult.first->second;
101
0
    assert(V[Index] == X && "Value not actually at index in map!");
102
0
    if (Index != (ptrdiff_t)(V.size() - 1)) {
103
0
      // If the element isn't at the back, null it out and append a fresh one.
104
0
      V[Index] = T();
105
0
      Index = (ptrdiff_t)V.size();
106
0
      V.push_back(X);
107
0
    }
108
0
    return false;
109
0
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::SCC*, llvm::SmallVector<llvm::LazyCallGraph::SCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::SCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::SCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::SCC*, long> > >::insert(llvm::LazyCallGraph::SCC* const&)
Line
Count
Source
91
1.14k
  bool insert(const T &X) {
92
1.14k
    assert(X != T() && "Cannot insert a null (default constructed) value!");
93
1.14k
    auto InsertResult = M.insert({X, V.size()});
94
1.14k
    if (InsertResult.second) {
95
1.13k
      // Fresh value, just append it to the vector.
96
1.13k
      V.push_back(X);
97
1.13k
      return true;
98
1.13k
    }
99
10
100
10
    auto &Index = InsertResult.first->second;
101
10
    assert(V[Index] == X && "Value not actually at index in map!");
102
10
    if (Index != (ptrdiff_t)(V.size() - 1)) {
103
4
      // If the element isn't at the back, null it out and append a fresh one.
104
4
      V[Index] = T();
105
4
      Index = (ptrdiff_t)V.size();
106
4
      V.push_back(X);
107
4
    }
108
10
    return false;
109
10
  }
llvm::PriorityWorklist<llvm::Loop*, llvm::SmallVector<llvm::Loop*, 4u>, llvm::SmallDenseMap<llvm::Loop*, long, 4u, llvm::DenseMapInfo<llvm::Loop*>, llvm::detail::DenseMapPair<llvm::Loop*, long> > >::insert(llvm::Loop* const&)
Line
Count
Source
91
687
  bool insert(const T &X) {
92
687
    assert(X != T() && "Cannot insert a null (default constructed) value!");
93
687
    auto InsertResult = M.insert({X, V.size()});
94
687
    if (InsertResult.second) {
95
687
      // Fresh value, just append it to the vector.
96
687
      V.push_back(X);
97
687
      return true;
98
687
    }
99
0
100
0
    auto &Index = InsertResult.first->second;
101
0
    assert(V[Index] == X && "Value not actually at index in map!");
102
0
    if (Index != (ptrdiff_t)(V.size() - 1)) {
103
0
      // If the element isn't at the back, null it out and append a fresh one.
104
0
      V[Index] = T();
105
0
      Index = (ptrdiff_t)V.size();
106
0
      V.push_back(X);
107
0
    }
108
0
    return false;
109
0
  }
Unexecuted instantiation: llvm::PriorityWorklist<llvm::Region*, llvm::SmallVector<llvm::Region*, 4u>, llvm::SmallDenseMap<llvm::Region*, long, 4u, llvm::DenseMapInfo<llvm::Region*>, llvm::detail::DenseMapPair<llvm::Region*, long> > >::insert(llvm::Region* const&)
110
111
  /// Insert a sequence of new elements into the PriorityWorklist.
112
  template <typename SequenceT>
113
  typename std::enable_if<!std::is_convertible<SequenceT, T>::value>::type
114
1.91k
  insert(SequenceT &&Input) {
115
1.91k
    if (std::begin(Input) == std::end(Input))
116
0
      // Nothing to do for an empty input sequence.
117
0
      return;
118
1.91k
119
1.91k
    // First pull the input sequence into the vector as a bulk append
120
1.91k
    // operation.
121
1.91k
    ptrdiff_t StartIndex = V.size();
122
1.91k
    V.insert(V.end(), std::begin(Input), std::end(Input));
123
1.91k
    // Now walk backwards fixing up the index map and deleting any duplicates.
124
4.79k
    for (ptrdiff_t i = V.size() - 1; i >= StartIndex; 
--i2.88k
) {
125
2.88k
      auto InsertResult = M.insert({V[i], i});
126
2.88k
      if (InsertResult.second)
127
2.88k
        continue;
128
0
129
0
      // If the existing index is before this insert's start, nuke that one and
130
0
      // move it up.
131
0
      ptrdiff_t &Index = InsertResult.first->second;
132
0
      if (Index < StartIndex) {
133
0
        V[Index] = T();
134
0
        Index = i;
135
0
        continue;
136
0
      }
137
0
138
0
      // Otherwise the existing one comes first so just clear out the value in
139
0
      // this slot.
140
0
      V[i] = T();
141
0
    }
142
1.91k
  }
143
144
  /// Remove the last element of the PriorityWorklist.
145
5.76k
  void pop_back() {
146
5.76k
    assert(!empty() && "Cannot remove an element when empty!");
147
5.76k
    assert(back() != T() && "Cannot have a null element at the back!");
148
5.76k
    M.erase(back());
149
5.76k
    do {
150
5.76k
      V.pop_back();
151
5.76k
    } while (!V.empty() && 
V.back() == T()2.28k
);
152
5.76k
  }
Unexecuted instantiation: llvm::PriorityWorklist<llvm::Region*, llvm::SmallVector<llvm::Region*, 4u>, llvm::SmallDenseMap<llvm::Region*, long, 4u, llvm::DenseMapInfo<llvm::Region*>, llvm::detail::DenseMapPair<llvm::Region*, long> > >::pop_back()
llvm::PriorityWorklist<llvm::Loop*, llvm::SmallVector<llvm::Loop*, 4u>, llvm::SmallDenseMap<llvm::Loop*, long, 4u, llvm::DenseMapInfo<llvm::Loop*>, llvm::detail::DenseMapPair<llvm::Loop*, long> > >::pop_back()
Line
Count
Source
145
3.56k
  void pop_back() {
146
3.56k
    assert(!empty() && "Cannot remove an element when empty!");
147
3.56k
    assert(back() != T() && "Cannot have a null element at the back!");
148
3.56k
    M.erase(back());
149
3.56k
    do {
150
3.56k
      V.pop_back();
151
3.56k
    } while (!V.empty() && 
V.back() == T()2.22k
);
152
3.56k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::RefSCC*, llvm::SmallVector<llvm::LazyCallGraph::RefSCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::RefSCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::RefSCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::RefSCC*, long> > >::pop_back()
Line
Count
Source
145
1.06k
  void pop_back() {
146
1.06k
    assert(!empty() && "Cannot remove an element when empty!");
147
1.06k
    assert(back() != T() && "Cannot have a null element at the back!");
148
1.06k
    M.erase(back());
149
1.06k
    do {
150
1.06k
      V.pop_back();
151
1.06k
    } while (!V.empty() && 
V.back() == T()6
);
152
1.06k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::SCC*, llvm::SmallVector<llvm::LazyCallGraph::SCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::SCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::SCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::SCC*, long> > >::pop_back()
Line
Count
Source
145
1.13k
  void pop_back() {
146
1.13k
    assert(!empty() && "Cannot remove an element when empty!");
147
1.13k
    assert(back() != T() && "Cannot have a null element at the back!");
148
1.13k
    M.erase(back());
149
1.13k
    do {
150
1.13k
      V.pop_back();
151
1.13k
    } while (!V.empty() && 
V.back() == T()54
);
152
1.13k
  }
153
154
5.76k
  LLVM_NODISCARD T pop_back_val() {
155
5.76k
    T Ret = back();
156
5.76k
    pop_back();
157
5.76k
    return Ret;
158
5.76k
  }
Unexecuted instantiation: llvm::PriorityWorklist<llvm::Region*, llvm::SmallVector<llvm::Region*, 4u>, llvm::SmallDenseMap<llvm::Region*, long, 4u, llvm::DenseMapInfo<llvm::Region*>, llvm::detail::DenseMapPair<llvm::Region*, long> > >::pop_back_val()
llvm::PriorityWorklist<llvm::Loop*, llvm::SmallVector<llvm::Loop*, 4u>, llvm::SmallDenseMap<llvm::Loop*, long, 4u, llvm::DenseMapInfo<llvm::Loop*>, llvm::detail::DenseMapPair<llvm::Loop*, long> > >::pop_back_val()
Line
Count
Source
154
3.56k
  LLVM_NODISCARD T pop_back_val() {
155
3.56k
    T Ret = back();
156
3.56k
    pop_back();
157
3.56k
    return Ret;
158
3.56k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::RefSCC*, llvm::SmallVector<llvm::LazyCallGraph::RefSCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::RefSCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::RefSCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::RefSCC*, long> > >::pop_back_val()
Line
Count
Source
154
1.06k
  LLVM_NODISCARD T pop_back_val() {
155
1.06k
    T Ret = back();
156
1.06k
    pop_back();
157
1.06k
    return Ret;
158
1.06k
  }
llvm::PriorityWorklist<llvm::LazyCallGraph::SCC*, llvm::SmallVector<llvm::LazyCallGraph::SCC*, 1u>, llvm::SmallDenseMap<llvm::LazyCallGraph::SCC*, long, 4u, llvm::DenseMapInfo<llvm::LazyCallGraph::SCC*>, llvm::detail::DenseMapPair<llvm::LazyCallGraph::SCC*, long> > >::pop_back_val()
Line
Count
Source
154
1.13k
  LLVM_NODISCARD T pop_back_val() {
155
1.13k
    T Ret = back();
156
1.13k
    pop_back();
157
1.13k
    return Ret;
158
1.13k
  }
159
160
  /// Erase an item from the worklist.
161
  ///
162
  /// Note that this is constant time due to the nature of the worklist implementation.
163
0
  bool erase(const T& X) {
164
0
    auto I = M.find(X);
165
0
    if (I == M.end())
166
0
      return false;
167
0
168
0
    assert(V[I->second] == X && "Value not actually at index in map!");
169
0
    if (I->second == (ptrdiff_t)(V.size() - 1)) {
170
0
      do {
171
0
        V.pop_back();
172
0
      } while (!V.empty() && V.back() == T());
173
0
    } else {
174
0
      V[I->second] = T();
175
0
    }
176
0
    M.erase(I);
177
0
    return true;
178
0
  }
179
180
  /// Erase items from the set vector based on a predicate function.
181
  ///
182
  /// This is intended to be equivalent to the following code, if we could
183
  /// write it:
184
  ///
185
  /// \code
186
  ///   V.erase(remove_if(V, P), V.end());
187
  /// \endcode
188
  ///
189
  /// However, PriorityWorklist doesn't expose non-const iterators, making any
190
  /// algorithm like remove_if impossible to use.
191
  ///
192
  /// \returns true if any element is removed.
193
  template <typename UnaryPredicate>
194
  bool erase_if(UnaryPredicate P) {
195
    typename VectorT::iterator E =
196
        remove_if(V, TestAndEraseFromMap<UnaryPredicate>(P, M));
197
    if (E == V.end())
198
      return false;
199
    for (auto I = V.begin(); I != E; ++I)
200
      if (*I != T())
201
        M[*I] = I - V.begin();
202
    V.erase(E, V.end());
203
    return true;
204
  }
205
206
  /// Reverse the items in the PriorityWorklist.
207
  ///
208
  /// This does an in-place reversal. Other kinds of reverse aren't easy to
209
  /// support in the face of the worklist semantics.
210
211
  /// Completely clear the PriorityWorklist
212
  void clear() {
213
    M.clear();
214
    V.clear();
215
  }
216
217
private:
218
  /// A wrapper predicate designed for use with std::remove_if.
219
  ///
220
  /// This predicate wraps a predicate suitable for use with std::remove_if to
221
  /// call M.erase(x) on each element which is slated for removal. This just
222
  /// allows the predicate to be move only which we can't do with lambdas
223
  /// today.
224
  template <typename UnaryPredicateT>
225
  class TestAndEraseFromMap {
226
    UnaryPredicateT P;
227
    MapT &M;
228
229
  public:
230
    TestAndEraseFromMap(UnaryPredicateT P, MapT &M)
231
        : P(std::move(P)), M(M) {}
232
233
    bool operator()(const T &Arg) {
234
      if (Arg == T())
235
        // Skip null values in the PriorityWorklist.
236
        return false;
237
238
      if (P(Arg)) {
239
        M.erase(Arg);
240
        return true;
241
      }
242
      return false;
243
    }
244
  };
245
246
  /// The map from value to index in the vector.
247
  MapT M;
248
249
  /// The vector of elements in insertion order.
250
  VectorT V;
251
};
252
253
/// A version of \c PriorityWorklist that selects small size optimized data
254
/// structures for the vector and map.
255
template <typename T, unsigned N>
256
class SmallPriorityWorklist
257
    : public PriorityWorklist<T, SmallVector<T, N>,
258
                              SmallDenseMap<T, ptrdiff_t>> {
259
public:
260
1.79k
  SmallPriorityWorklist() = default;
Unexecuted instantiation: llvm::SmallPriorityWorklist<llvm::Region*, 4u>::SmallPriorityWorklist()
llvm::SmallPriorityWorklist<llvm::Loop*, 4u>::SmallPriorityWorklist()
Line
Count
Source
260
1.10k
  SmallPriorityWorklist() = default;
llvm::SmallPriorityWorklist<llvm::LazyCallGraph::RefSCC*, 1u>::SmallPriorityWorklist()
Line
Count
Source
260
344
  SmallPriorityWorklist() = default;
llvm::SmallPriorityWorklist<llvm::LazyCallGraph::SCC*, 1u>::SmallPriorityWorklist()
Line
Count
Source
260
344
  SmallPriorityWorklist() = default;
261
};
262
263
} // end namespace llvm
264
265
#endif // LLVM_ADT_PRIORITYWORKLIST_H