Coverage Report

Created: 2019-02-15 18:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/ADT/simple_ilist.h
Line
Count
Source (jump to first uncovered line)
1
//===- llvm/ADT/simple_ilist.h - Simple Intrusive List ----------*- 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
#ifndef LLVM_ADT_SIMPLE_ILIST_H
10
#define LLVM_ADT_SIMPLE_ILIST_H
11
12
#include "llvm/ADT/ilist_base.h"
13
#include "llvm/ADT/ilist_iterator.h"
14
#include "llvm/ADT/ilist_node.h"
15
#include "llvm/ADT/ilist_node_options.h"
16
#include "llvm/Support/Compiler.h"
17
#include <algorithm>
18
#include <cassert>
19
#include <cstddef>
20
#include <functional>
21
#include <iterator>
22
#include <utility>
23
24
namespace llvm {
25
26
/// A simple intrusive list implementation.
27
///
28
/// This is a simple intrusive list for a \c T that inherits from \c
29
/// ilist_node<T>.  The list never takes ownership of anything inserted in it.
30
///
31
/// Unlike \a iplist<T> and \a ilist<T>, \a simple_ilist<T> never allocates or
32
/// deletes values, and has no callback traits.
33
///
34
/// The API for adding nodes include \a push_front(), \a push_back(), and \a
35
/// insert().  These all take values by reference (not by pointer), except for
36
/// the range version of \a insert().
37
///
38
/// There are three sets of API for discarding nodes from the list: \a
39
/// remove(), which takes a reference to the node to remove, \a erase(), which
40
/// takes an iterator or iterator range and returns the next one, and \a
41
/// clear(), which empties out the container.  All three are constant time
42
/// operations.  None of these deletes any nodes; in particular, if there is a
43
/// single node in the list, then these have identical semantics:
44
/// \li \c L.remove(L.front());
45
/// \li \c L.erase(L.begin());
46
/// \li \c L.clear();
47
///
48
/// As a convenience for callers, there are parallel APIs that take a \c
49
/// Disposer (such as \c std::default_delete<T>): \a removeAndDispose(), \a
50
/// eraseAndDispose(), and \a clearAndDispose().  These have different names
51
/// because the extra semantic is otherwise non-obvious.  They are equivalent
52
/// to calling \a std::for_each() on the range to be discarded.
53
///
54
/// The currently available \p Options customize the nodes in the list.  The
55
/// same options must be specified in the \a ilist_node instantation for
56
/// compatibility (although the order is irrelevant).
57
/// \li Use \a ilist_tag to designate which ilist_node for a given \p T this
58
/// list should use.  This is useful if a type \p T is part of multiple,
59
/// independent lists simultaneously.
60
/// \li Use \a ilist_sentinel_tracking to always (or never) track whether a
61
/// node is a sentinel.  Specifying \c true enables the \a
62
/// ilist_node::isSentinel() API.  Unlike \a ilist_node::isKnownSentinel(),
63
/// which is only appropriate for assertions, \a ilist_node::isSentinel() is
64
/// appropriate for real logic.
65
///
66
/// Here are examples of \p Options usage:
67
/// \li \c simple_ilist<T> gives the defaults.  \li \c
68
/// simple_ilist<T,ilist_sentinel_tracking<true>> enables the \a
69
/// ilist_node::isSentinel() API.
70
/// \li \c simple_ilist<T,ilist_tag<A>,ilist_sentinel_tracking<false>>
71
/// specifies a tag of A and that tracking should be off (even when
72
/// LLVM_ENABLE_ABI_BREAKING_CHECKS are enabled).
73
/// \li \c simple_ilist<T,ilist_sentinel_tracking<false>,ilist_tag<A>> is
74
/// equivalent to the last.
75
///
76
/// See \a is_valid_option for steps on adding a new option.
77
template <typename T, class... Options>
78
class simple_ilist
79
    : ilist_detail::compute_node_options<T, Options...>::type::list_base_type,
80
      ilist_detail::SpecificNodeAccess<
81
          typename ilist_detail::compute_node_options<T, Options...>::type> {
82
  static_assert(ilist_detail::check_options<Options...>::value,
83
                "Unrecognized node option!");
84
  using OptionsT =
85
      typename ilist_detail::compute_node_options<T, Options...>::type;
86
  using list_base_type = typename OptionsT::list_base_type;
87
  ilist_sentinel<OptionsT> Sentinel;
88
89
public:
90
  using value_type = typename OptionsT::value_type;
91
  using pointer = typename OptionsT::pointer;
92
  using reference = typename OptionsT::reference;
93
  using const_pointer = typename OptionsT::const_pointer;
94
  using const_reference = typename OptionsT::const_reference;
95
  using iterator = ilist_iterator<OptionsT, false, false>;
96
  using const_iterator = ilist_iterator<OptionsT, false, true>;
97
  using reverse_iterator = ilist_iterator<OptionsT, true, false>;
98
  using const_reverse_iterator = ilist_iterator<OptionsT, true, true>;
99
  using size_type = size_t;
100
  using difference_type = ptrdiff_t;
101
102
25.4M
  simple_ilist() = default;
llvm::simple_ilist<llvm::AliasSet>::simple_ilist()
Line
Count
Source
102
572k
  simple_ilist() = default;
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::simple_ilist()
Line
Count
Source
102
6
  simple_ilist() = default;
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::simple_ilist()
Line
Count
Source
102
4
  simple_ilist() = default;
llvm::simple_ilist<llvm::IVStrideUse>::simple_ilist()
Line
Count
Source
102
206k
  simple_ilist() = default;
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::simple_ilist()
Line
Count
Source
102
3.71M
  simple_ilist() = default;
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::simple_ilist()
Line
Count
Source
102
3.07M
  simple_ilist() = default;
llvm::simple_ilist<llvm::MachineBasicBlock>::simple_ilist()
Line
Count
Source
102
483k
  simple_ilist() = default;
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::simple_ilist()
Line
Count
Source
102
3.97M
  simple_ilist() = default;
llvm::simple_ilist<llvm::IndexListEntry>::simple_ilist()
Line
Count
Source
102
68.7k
  simple_ilist() = default;
llvm::simple_ilist<llvm::Instruction>::simple_ilist()
Line
Count
Source
102
7.44M
  simple_ilist() = default;
llvm::simple_ilist<llvm::BasicBlock>::simple_ilist()
Line
Count
Source
102
2.12M
  simple_ilist() = default;
llvm::simple_ilist<llvm::GlobalVariable>::simple_ilist()
Line
Count
Source
102
62.1k
  simple_ilist() = default;
llvm::simple_ilist<llvm::Function>::simple_ilist()
Line
Count
Source
102
62.1k
  simple_ilist() = default;
llvm::simple_ilist<llvm::GlobalAlias>::simple_ilist()
Line
Count
Source
102
62.1k
  simple_ilist() = default;
llvm::simple_ilist<llvm::GlobalIFunc>::simple_ilist()
Line
Count
Source
102
62.1k
  simple_ilist() = default;
llvm::simple_ilist<llvm::NamedMDNode>::simple_ilist()
Line
Count
Source
102
62.1k
  simple_ilist() = default;
llvm::simple_ilist<llvm::MCFragment>::simple_ilist()
Line
Count
Source
102
2.75M
  simple_ilist() = default;
llvm::simple_ilist<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node>::simple_ilist()
Line
Count
Source
102
3.74k
  simple_ilist() = default;
llvm::simple_ilist<llvm::PredicateBase>::simple_ilist()
Line
Count
Source
102
582k
  simple_ilist() = default;
llvm::simple_ilist<llvm::VPRecipeBase>::simple_ilist()
Line
Count
Source
102
90.1k
  simple_ilist() = default;
llvm::simple_ilist<llvm::SDNode>::simple_ilist()
Line
Count
Source
102
36.0k
  simple_ilist() = default;
llvm::simple_ilist<clang::ento::BugReport>::simple_ilist()
Line
Count
Source
102
10.8k
  simple_ilist() = default;
llvm::simple_ilist<lld::SimpleReference>::simple_ilist()
Line
Count
Source
102
855
  simple_ilist() = default;
llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::simple_ilist()
Line
Count
Source
102
368
  simple_ilist() = default;
103
  ~simple_ilist() = default;
104
105
  // No copy constructors.
106
  simple_ilist(const simple_ilist &) = delete;
107
  simple_ilist &operator=(const simple_ilist &) = delete;
108
109
  // Move constructors.
110
24
  simple_ilist(simple_ilist &&X) { splice(end(), X); }
111
  simple_ilist &operator=(simple_ilist &&X) {
112
    clear();
113
    splice(end(), X);
114
    return *this;
115
  }
116
117
1.77G
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::AliasSet>::begin()
Line
Count
Source
117
5.45M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineBasicBlock>::begin()
Line
Count
Source
117
46.2M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::begin()
Line
Count
Source
117
578M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::Instruction>::begin()
Line
Count
Source
117
720M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::Function>::begin()
Line
Count
Source
117
1.27M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::BasicBlock>::begin()
Line
Count
Source
117
141M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalAlias>::begin()
Line
Count
Source
117
362k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalVariable>::begin()
Line
Count
Source
117
640k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::SDNode>::begin()
Line
Count
Source
117
180M
  iterator begin() { return ++iterator(Sentinel); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::begin()
Line
Count
Source
117
49.5k
  iterator begin() { return ++iterator(Sentinel); }
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::begin()
Line
Count
Source
117
1.49k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::MCFragment>::begin()
Line
Count
Source
117
59.1M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::IVStrideUse>::begin()
Line
Count
Source
117
944k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::begin()
Line
Count
Source
117
24.5M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::begin()
Line
Count
Source
117
1.22M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::IndexListEntry>::begin()
Line
Count
Source
117
1.07M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalIFunc>::begin()
Line
Count
Source
117
240k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::NamedMDNode>::begin()
Line
Count
Source
117
141k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node>::begin()
Line
Count
Source
117
9.64M
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::PredicateBase>::begin()
Line
Count
Source
117
582k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<llvm::VPRecipeBase>::begin()
Line
Count
Source
117
201k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<clang::ento::BugReport>::begin()
Line
Count
Source
117
31.6k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<lld::SimpleReference>::begin()
Line
Count
Source
117
7.13k
  iterator begin() { return ++iterator(Sentinel); }
llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::begin()
Line
Count
Source
117
2.01k
  iterator begin() { return ++iterator(Sentinel); }
118
216M
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::AliasSet>::begin() const
Line
Count
Source
118
70.7k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineBasicBlock>::begin() const
Line
Count
Source
118
30.6M
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::begin() const
Line
Count
Source
118
37.9M
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::Instruction>::begin() const
Line
Count
Source
118
101M
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::Function>::begin() const
Line
Count
Source
118
356k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::BasicBlock>::begin() const
Line
Count
Source
118
37.5M
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalAlias>::begin() const
Line
Count
Source
118
204k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalVariable>::begin() const
Line
Count
Source
118
324k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::SDNode>::begin() const
Line
Count
Source
118
26.4k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::begin() const
Line
Count
Source
118
1.97k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MCFragment>::begin() const
Line
Count
Source
118
6.92M
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::begin() const
Line
Count
Source
118
46.0k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::IVStrideUse>::begin() const
Line
Count
Source
118
23
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalIFunc>::begin() const
Line
Count
Source
118
80.7k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::NamedMDNode>::begin() const
Line
Count
Source
118
175k
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::begin() const
Line
Count
Source
118
861
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<llvm::VPRecipeBase>::begin() const
Line
Count
Source
118
2
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<clang::ento::BugReport>::begin() const
Line
Count
Source
118
826
  const_iterator begin() const { return ++const_iterator(Sentinel); }
llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::begin() const
Line
Count
Source
118
368
  const_iterator begin() const { return ++const_iterator(Sentinel); }
119
2.11G
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::AliasSet>::end()
Line
Count
Source
119
6.45M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineBasicBlock>::end()
Line
Count
Source
119
116M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::end()
Line
Count
Source
119
806M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::Instruction>::end()
Line
Count
Source
119
718M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::Function>::end()
Line
Count
Source
119
3.43M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::BasicBlock>::end()
Line
Count
Source
119
151M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalAlias>::end()
Line
Count
Source
119
366k
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalVariable>::end()
Line
Count
Source
119
1.24M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::SDNode>::end()
Line
Count
Source
119
79.8M
  iterator end() { return iterator(Sentinel); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::end()
Line
Count
Source
119
672
  iterator end() { return iterator(Sentinel); }
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::end()
Line
Count
Source
119
1.04k
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::MCFragment>::end()
Line
Count
Source
119
4.89M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::IVStrideUse>::end()
Line
Count
Source
119
1.53M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::end()
Line
Count
Source
119
23.4M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::end()
Line
Count
Source
119
5.47M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::IndexListEntry>::end()
Line
Count
Source
119
193M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalIFunc>::end()
Line
Count
Source
119
241k
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::NamedMDNode>::end()
Line
Count
Source
119
199k
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node>::end()
Line
Count
Source
119
1.69M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::PredicateBase>::end()
Line
Count
Source
119
3.73M
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<llvm::VPRecipeBase>::end()
Line
Count
Source
119
567k
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<clang::ento::BugReport>::end()
Line
Count
Source
119
43.0k
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<lld::SimpleReference>::end()
Line
Count
Source
119
8.63k
  iterator end() { return iterator(Sentinel); }
llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::end()
Line
Count
Source
119
2.28k
  iterator end() { return iterator(Sentinel); }
120
266M
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::AliasSet>::end() const
Line
Count
Source
120
70.7k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineBasicBlock>::end() const
Line
Count
Source
120
33.9M
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::end() const
Line
Count
Source
120
59.3M
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::Instruction>::end() const
Line
Count
Source
120
150M
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::Function>::end() const
Line
Count
Source
120
356k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::BasicBlock>::end() const
Line
Count
Source
120
20.8M
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalAlias>::end() const
Line
Count
Source
120
204k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalVariable>::end() const
Line
Count
Source
120
324k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::SDNode>::end() const
Line
Count
Source
120
26.4k
  const_iterator end() const { return const_iterator(Sentinel); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::end() const
Line
Count
Source
120
1.97k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MCFragment>::end() const
Line
Count
Source
120
488k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::end() const
Line
Count
Source
120
46.0k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::IVStrideUse>::end() const
Line
Count
Source
120
23
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::GlobalIFunc>::end() const
Line
Count
Source
120
80.7k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::NamedMDNode>::end() const
Line
Count
Source
120
175k
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::end() const
Line
Count
Source
120
625
  const_iterator end() const { return const_iterator(Sentinel); }
llvm::simple_ilist<llvm::VPRecipeBase>::end() const
Line
Count
Source
120
2
  const_iterator end() const { return const_iterator(Sentinel); }
Unexecuted instantiation: llvm::simple_ilist<clang::ento::BugReport>::end() const
llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::end() const
Line
Count
Source
120
368
  const_iterator end() const { return const_iterator(Sentinel); }
121
98.9M
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::rbegin()
Line
Count
Source
121
10.4M
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::Instruction>::rbegin()
Line
Count
Source
121
12.5M
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineBasicBlock>::rbegin()
Line
Count
Source
121
1.28M
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::AliasSet>::rbegin()
Line
Count
Source
121
1.89M
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::IVStrideUse>::rbegin()
Line
Count
Source
121
592k
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::rbegin()
Line
Count
Source
121
42
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::IndexListEntry>::rbegin()
Line
Count
Source
121
71.0M
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
Unexecuted instantiation: llvm::simple_ilist<llvm::Function>::rbegin()
llvm::simple_ilist<llvm::MCFragment>::rbegin()
Line
Count
Source
121
976k
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::VPRecipeBase>::rbegin()
Line
Count
Source
121
77.2k
  reverse_iterator rbegin() { return ++reverse_iterator(Sentinel); }
122
4.29G
  const_reverse_iterator rbegin() const {
123
4.29G
    return ++const_reverse_iterator(Sentinel);
124
4.29G
  }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::rbegin() const
Line
Count
Source
122
2.25M
  const_reverse_iterator rbegin() const {
123
2.25M
    return ++const_reverse_iterator(Sentinel);
124
2.25M
  }
llvm::simple_ilist<llvm::Instruction>::rbegin() const
Line
Count
Source
122
4.28G
  const_reverse_iterator rbegin() const {
123
4.28G
    return ++const_reverse_iterator(Sentinel);
124
4.28G
  }
llvm::simple_ilist<llvm::MachineBasicBlock>::rbegin() const
Line
Count
Source
122
390k
  const_reverse_iterator rbegin() const {
123
390k
    return ++const_reverse_iterator(Sentinel);
124
390k
  }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::rbegin() const
Line
Count
Source
122
1.21M
  const_reverse_iterator rbegin() const {
123
1.21M
    return ++const_reverse_iterator(Sentinel);
124
1.21M
  }
llvm::simple_ilist<llvm::Function>::rbegin() const
Line
Count
Source
122
3.55k
  const_reverse_iterator rbegin() const {
123
3.55k
    return ++const_reverse_iterator(Sentinel);
124
3.55k
  }
Unexecuted instantiation: llvm::simple_ilist<llvm::BasicBlock>::rbegin() const
llvm::simple_ilist<llvm::MCFragment>::rbegin() const
Line
Count
Source
122
528k
  const_reverse_iterator rbegin() const {
123
528k
    return ++const_reverse_iterator(Sentinel);
124
528k
  }
Unexecuted instantiation: llvm::simple_ilist<llvm::VPRecipeBase>::rbegin() const
125
49.1M
  reverse_iterator rend() { return reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::rend()
Line
Count
Source
125
13.6M
  reverse_iterator rend() { return reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::Instruction>::rend()
Line
Count
Source
125
34.4M
  reverse_iterator rend() { return reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::MachineBasicBlock>::rend()
Line
Count
Source
125
989k
  reverse_iterator rend() { return reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::rend()
Line
Count
Source
125
63
  reverse_iterator rend() { return reverse_iterator(Sentinel); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::rend()
Line
Count
Source
125
32
  reverse_iterator rend() { return reverse_iterator(Sentinel); }
Unexecuted instantiation: llvm::simple_ilist<llvm::Function>::rend()
Unexecuted instantiation: llvm::simple_ilist<llvm::MCFragment>::rend()
Unexecuted instantiation: llvm::simple_ilist<llvm::VPRecipeBase>::rend()
126
2.30M
  const_reverse_iterator rend() const {
127
2.30M
    return const_reverse_iterator(Sentinel);
128
2.30M
  }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::rend() const
Line
Count
Source
126
2.30M
  const_reverse_iterator rend() const {
127
2.30M
    return const_reverse_iterator(Sentinel);
128
2.30M
  }
Unexecuted instantiation: llvm::simple_ilist<llvm::Instruction>::rend() const
Unexecuted instantiation: llvm::simple_ilist<llvm::MachineBasicBlock>::rend() const
llvm::simple_ilist<llvm::Function>::rend() const
Line
Count
Source
126
3.55k
  const_reverse_iterator rend() const {
127
3.55k
    return const_reverse_iterator(Sentinel);
128
3.55k
  }
Unexecuted instantiation: llvm::simple_ilist<llvm::MCFragment>::rend() const
Unexecuted instantiation: llvm::simple_ilist<llvm::VPRecipeBase>::rend() const
129
130
  /// Check if the list is empty in constant time.
131
2.42G
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::empty() const
Line
Count
Source
131
97.2M
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::BasicBlock>::empty() const
Line
Count
Source
131
78.2M
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::empty() const
Line
Count
Source
131
1.97k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::empty() const
Line
Count
Source
131
1.43k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::Instruction>::empty() const
Line
Count
Source
131
2.20G
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::MachineBasicBlock>::empty() const
Line
Count
Source
131
7.71M
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::GlobalVariable>::empty() const
Line
Count
Source
131
23.4k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::IVStrideUse>::empty() const
Line
Count
Source
131
330k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::empty() const
Line
Count
Source
131
8.35k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::empty() const
Line
Count
Source
131
109k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
Unexecuted instantiation: llvm::simple_ilist<llvm::IndexListEntry>::empty() const
llvm::simple_ilist<llvm::Function>::empty() const
Line
Count
Source
131
8.62k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::GlobalAlias>::empty() const
Line
Count
Source
131
18.3k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::GlobalIFunc>::empty() const
Line
Count
Source
131
18.3k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::NamedMDNode>::empty() const
Line
Count
Source
131
23.0k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::MCFragment>::empty() const
Line
Count
Source
131
488k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node>::empty() const
Line
Count
Source
131
6.72M
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::VPRecipeBase>::empty() const
Line
Count
Source
131
78.5k
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
llvm::simple_ilist<llvm::SDNode>::empty() const
Line
Count
Source
131
30.4M
  LLVM_NODISCARD bool empty() const { return Sentinel.empty(); }
132
133
  /// Calculate the size of the list in linear time.
134
17.1M
  LLVM_NODISCARD size_type size() const {
135
17.1M
    return std::distance(begin(), end());
136
17.1M
  }
llvm::simple_ilist<llvm::BasicBlock>::size() const
Line
Count
Source
134
8.79M
  LLVM_NODISCARD size_type size() const {
135
8.79M
    return std::distance(begin(), end());
136
8.79M
  }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::size() const
Line
Count
Source
134
646k
  LLVM_NODISCARD size_type size() const {
135
646k
    return std::distance(begin(), end());
136
646k
  }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::size() const
Line
Count
Source
134
1.97k
  LLVM_NODISCARD size_type size() const {
135
1.97k
    return std::distance(begin(), end());
136
1.97k
  }
llvm::simple_ilist<llvm::MachineBasicBlock>::size() const
Line
Count
Source
134
4.45M
  LLVM_NODISCARD size_type size() const {
135
4.45M
    return std::distance(begin(), end());
136
4.45M
  }
llvm::simple_ilist<llvm::SDNode>::size() const
Line
Count
Source
134
26.4k
  LLVM_NODISCARD size_type size() const {
135
26.4k
    return std::distance(begin(), end());
136
26.4k
  }
llvm::simple_ilist<llvm::GlobalAlias>::size() const
Line
Count
Source
134
257
  LLVM_NODISCARD size_type size() const {
135
257
    return std::distance(begin(), end());
136
257
  }
llvm::simple_ilist<llvm::GlobalVariable>::size() const
Line
Count
Source
134
685
  LLVM_NODISCARD size_type size() const {
135
685
    return std::distance(begin(), end());
136
685
  }
llvm::simple_ilist<llvm::AliasSet>::size() const
Line
Count
Source
134
149
  LLVM_NODISCARD size_type size() const {
135
149
    return std::distance(begin(), end());
136
149
  }
llvm::simple_ilist<llvm::Function>::size() const
Line
Count
Source
134
2.19k
  LLVM_NODISCARD size_type size() const {
135
2.19k
    return std::distance(begin(), end());
136
2.19k
  }
llvm::simple_ilist<llvm::Instruction>::size() const
Line
Count
Source
134
3.18M
  LLVM_NODISCARD size_type size() const {
135
3.18M
    return std::distance(begin(), end());
136
3.18M
  }
Unexecuted instantiation: llvm::simple_ilist<llvm::GlobalIFunc>::size() const
llvm::simple_ilist<llvm::MCFragment>::size() const
Line
Count
Source
134
8
  LLVM_NODISCARD size_type size() const {
135
8
    return std::distance(begin(), end());
136
8
  }
llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::size() const
Line
Count
Source
134
368
  LLVM_NODISCARD size_type size() const {
135
368
    return std::distance(begin(), end());
136
368
  }
137
138
176M
  reference front() { return *begin(); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::front()
Line
Count
Source
138
30.0M
  reference front() { return *begin(); }
llvm::simple_ilist<llvm::MachineBasicBlock>::front()
Line
Count
Source
138
10.8M
  reference front() { return *begin(); }
llvm::simple_ilist<llvm::BasicBlock>::front()
Line
Count
Source
138
82.3M
  reference front() { return *begin(); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::front()
Line
Count
Source
138
1.97k
  reference front() { return *begin(); }
llvm::simple_ilist<llvm::Instruction>::front()
Line
Count
Source
138
11.5M
  reference front() { return *begin(); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::front()
Line
Count
Source
138
8.52M
  reference front() { return *begin(); }
llvm::simple_ilist<llvm::IndexListEntry>::front()
Line
Count
Source
138
40.0k
  reference front() { return *begin(); }
llvm::simple_ilist<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node>::front()
Line
Count
Source
138
3.89M
  reference front() { return *begin(); }
Unexecuted instantiation: llvm::simple_ilist<llvm::VPRecipeBase>::front()
llvm::simple_ilist<llvm::SDNode>::front()
Line
Count
Source
138
28.9M
  reference front() { return *begin(); }
139
34.8M
  const_reference front() const { return *begin(); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::front() const
Line
Count
Source
139
4
  const_reference front() const { return *begin(); }
llvm::simple_ilist<llvm::MachineBasicBlock>::front() const
Line
Count
Source
139
7.59M
  const_reference front() const { return *begin(); }
llvm::simple_ilist<llvm::BasicBlock>::front() const
Line
Count
Source
139
22.5M
  const_reference front() const { return *begin(); }
llvm::simple_ilist<llvm::Instruction>::front() const
Line
Count
Source
139
4.64M
  const_reference front() const { return *begin(); }
Unexecuted instantiation: llvm::simple_ilist<llvm::VPRecipeBase>::front() const
llvm::simple_ilist<clang::ento::BugReport>::front() const
Line
Count
Source
139
826
  const_reference front() const { return *begin(); }
140
74.5M
  reference back() { return *rbegin(); }
llvm::simple_ilist<llvm::Instruction>::back()
Line
Count
Source
140
614k
  reference back() { return *rbegin(); }
llvm::simple_ilist<llvm::MachineBasicBlock>::back()
Line
Count
Source
140
292k
  reference back() { return *rbegin(); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::back()
Line
Count
Source
140
19
  reference back() { return *rbegin(); }
llvm::simple_ilist<llvm::AliasSet>::back()
Line
Count
Source
140
1.89M
  reference back() { return *rbegin(); }
llvm::simple_ilist<llvm::IVStrideUse>::back()
Line
Count
Source
140
592k
  reference back() { return *rbegin(); }
llvm::simple_ilist<llvm::IndexListEntry>::back()
Line
Count
Source
140
71.0M
  reference back() { return *rbegin(); }
llvm::simple_ilist<llvm::VPRecipeBase>::back()
Line
Count
Source
140
77.2k
  reference back() { return *rbegin(); }
141
4.28G
  const_reference back() const { return *rbegin(); }
llvm::simple_ilist<llvm::Instruction>::back() const
Line
Count
Source
141
4.28G
  const_reference back() const { return *rbegin(); }
llvm::simple_ilist<llvm::MachineBasicBlock>::back() const
Line
Count
Source
141
390k
  const_reference back() const { return *rbegin(); }
Unexecuted instantiation: llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::back() const
Unexecuted instantiation: llvm::simple_ilist<llvm::BasicBlock>::back() const
llvm::simple_ilist<llvm::MCFragment>::back() const
Line
Count
Source
141
528k
  const_reference back() const { return *rbegin(); }
Unexecuted instantiation: llvm::simple_ilist<llvm::VPRecipeBase>::back() const
142
143
  /// Insert a node at the front; never copies.
144
1.27M
  void push_front(reference Node) { insert(begin(), Node); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::push_front((anonymous namespace)::GCNMinRegScheduler::Candidate&)
Line
Count
Source
144
44.0k
  void push_front(reference Node) { insert(begin(), Node); }
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::push_front((anonymous namespace)::GCNILPScheduler::Candidate&)
Line
Count
Source
144
452
  void push_front(reference Node) { insert(begin(), Node); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::push_front(llvm::MemoryAccess&)
Line
Count
Source
144
1.22M
  void push_front(reference Node) { insert(begin(), Node); }
145
146
  /// Insert a node at the back; never copies.
147
5.47M
  void push_back(reference Node) { insert(end(), Node); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::push_back((anonymous namespace)::GCNMinRegScheduler::Candidate&)
Line
Count
Source
147
16
  void push_back(reference Node) { insert(end(), Node); }
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::push_back((anonymous namespace)::GCNILPScheduler::Candidate&)
Line
Count
Source
147
454
  void push_back(reference Node) { insert(end(), Node); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::push_back(llvm::MemoryAccess&)
Line
Count
Source
147
5.47M
  void push_back(reference Node) { insert(end(), Node); }
148
149
  /// Remove the node at the front; never deletes.
150
  void pop_front() { erase(begin()); }
151
152
  /// Remove the node at the back; never deletes.
153
  void pop_back() { erase(--end()); }
154
155
  /// Swap with another list in place using std::swap.
156
  void swap(simple_ilist &X) { std::swap(*this, X); }
157
158
  /// Insert a node by reference; never copies.
159
301M
  iterator insert(iterator I, reference Node) {
160
301M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
301M
    return iterator(&Node);
162
301M
  }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>, llvm::MachineInstr&)
Line
Count
Source
159
69.2M
  iterator insert(iterator I, reference Node) {
160
69.2M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
69.2M
    return iterator(&Node);
162
69.2M
  }
llvm::simple_ilist<llvm::MachineBasicBlock>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, false, false, void>, false, false>, llvm::MachineBasicBlock&)
Line
Count
Source
159
3.97M
  iterator insert(iterator I, reference Node) {
160
3.97M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
3.97M
    return iterator(&Node);
162
3.97M
  }
llvm::simple_ilist<llvm::Instruction>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false>, llvm::Instruction&)
Line
Count
Source
159
51.9M
  iterator insert(iterator I, reference Node) {
160
51.9M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
51.9M
    return iterator(&Node);
162
51.9M
  }
llvm::simple_ilist<llvm::Function>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, false, false, void>, false, false>, llvm::Function&)
Line
Count
Source
159
2.12M
  iterator insert(iterator I, reference Node) {
160
2.12M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
2.12M
    return iterator(&Node);
162
2.12M
  }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<(anonymous namespace)::GCNMinRegScheduler::Candidate, false, false, void>, false, false>, (anonymous namespace)::GCNMinRegScheduler::Candidate&)
Line
Count
Source
159
44.0k
  iterator insert(iterator I, reference Node) {
160
44.0k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
44.0k
    return iterator(&Node);
162
44.0k
  }
llvm::simple_ilist<llvm::IndexListEntry>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::IndexListEntry, false, false, void>, false, false>, llvm::IndexListEntry&)
Line
Count
Source
159
62.6M
  iterator insert(iterator I, reference Node) {
160
62.6M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
62.6M
    return iterator(&Node);
162
62.6M
  }
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<(anonymous namespace)::GCNILPScheduler::Candidate, false, false, void>, false, false>, (anonymous namespace)::GCNILPScheduler::Candidate&)
Line
Count
Source
159
906
  iterator insert(iterator I, reference Node) {
160
906
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
906
    return iterator(&Node);
162
906
  }
llvm::simple_ilist<llvm::SDNode>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::SDNode, false, false, void>, false, false>, llvm::SDNode&)
Line
Count
Source
159
74.1M
  iterator insert(iterator I, reference Node) {
160
74.1M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
74.1M
    return iterator(&Node);
162
74.1M
  }
llvm::simple_ilist<llvm::GlobalVariable>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::GlobalVariable, false, false, void>, false, false>, llvm::GlobalVariable&)
Line
Count
Source
159
602k
  iterator insert(iterator I, reference Node) {
160
602k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
602k
    return iterator(&Node);
162
602k
  }
llvm::simple_ilist<llvm::AliasSet>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::AliasSet, false, false, void>, false, false>, llvm::AliasSet&)
Line
Count
Source
159
1.00M
  iterator insert(iterator I, reference Node) {
160
1.00M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
1.00M
    return iterator(&Node);
162
1.00M
  }
llvm::simple_ilist<llvm::IVStrideUse>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::IVStrideUse, false, false, void>, false, false>, llvm::IVStrideUse&)
Line
Count
Source
159
592k
  iterator insert(iterator I, reference Node) {
160
592k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
592k
    return iterator(&Node);
162
592k
  }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MemoryAccess, false, false, llvm::MSSAHelpers::AllAccessTag>, false, false>, llvm::MemoryAccess&)
Line
Count
Source
159
9.81M
  iterator insert(iterator I, reference Node) {
160
9.81M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
9.81M
    return iterator(&Node);
162
9.81M
  }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MemoryAccess, false, false, llvm::MSSAHelpers::DefsOnlyTag>, false, false>, llvm::MemoryAccess&)
Line
Count
Source
159
6.70M
  iterator insert(iterator I, reference Node) {
160
6.70M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
6.70M
    return iterator(&Node);
162
6.70M
  }
llvm::simple_ilist<llvm::BasicBlock>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::BasicBlock, false, false, void>, false, false>, llvm::BasicBlock&)
Line
Count
Source
159
7.07M
  iterator insert(iterator I, reference Node) {
160
7.07M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
7.07M
    return iterator(&Node);
162
7.07M
  }
llvm::simple_ilist<llvm::GlobalAlias>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::GlobalAlias, false, false, void>, false, false>, llvm::GlobalAlias&)
Line
Count
Source
159
3.64k
  iterator insert(iterator I, reference Node) {
160
3.64k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
3.64k
    return iterator(&Node);
162
3.64k
  }
llvm::simple_ilist<llvm::GlobalIFunc>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::GlobalIFunc, false, false, void>, false, false>, llvm::GlobalIFunc&)
Line
Count
Source
159
142
  iterator insert(iterator I, reference Node) {
160
142
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
142
    return iterator(&Node);
162
142
  }
llvm::simple_ilist<llvm::NamedMDNode>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::NamedMDNode, false, false, void>, false, false>, llvm::NamedMDNode&)
Line
Count
Source
159
57.4k
  iterator insert(iterator I, reference Node) {
160
57.4k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
57.4k
    return iterator(&Node);
162
57.4k
  }
llvm::simple_ilist<llvm::MCFragment>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MCFragment, false, false, void>, false, false>, llvm::MCFragment&)
Line
Count
Source
159
7.13M
  iterator insert(iterator I, reference Node) {
160
7.13M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
7.13M
    return iterator(&Node);
162
7.13M
  }
llvm::simple_ilist<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node, false, false, void>, false, false>, llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node&)
Line
Count
Source
159
1.20M
  iterator insert(iterator I, reference Node) {
160
1.20M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
1.20M
    return iterator(&Node);
162
1.20M
  }
llvm::simple_ilist<llvm::PredicateBase>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::PredicateBase, false, false, void>, false, false>, llvm::PredicateBase&)
Line
Count
Source
159
3.15M
  iterator insert(iterator I, reference Node) {
160
3.15M
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
3.15M
    return iterator(&Node);
162
3.15M
  }
llvm::simple_ilist<llvm::VPRecipeBase>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::VPRecipeBase, false, false, void>, false, false>, llvm::VPRecipeBase&)
Line
Count
Source
159
328k
  iterator insert(iterator I, reference Node) {
160
328k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
328k
    return iterator(&Node);
162
328k
  }
llvm::simple_ilist<clang::ento::BugReport>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<clang::ento::BugReport, false, false, void>, false, false>, clang::ento::BugReport&)
Line
Count
Source
159
11.3k
  iterator insert(iterator I, reference Node) {
160
11.3k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
11.3k
    return iterator(&Node);
162
11.3k
  }
llvm::simple_ilist<lld::SimpleReference>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<lld::SimpleReference, false, false, void>, false, false>, lld::SimpleReference&)
Line
Count
Source
159
1.47k
  iterator insert(iterator I, reference Node) {
160
1.47k
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
1.47k
    return iterator(&Node);
162
1.47k
  }
llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<lld::mach_o::normalized::TrieEdge, false, false, void>, false, false>, lld::mach_o::normalized::TrieEdge&)
Line
Count
Source
159
276
  iterator insert(iterator I, reference Node) {
160
276
    list_base_type::insertBefore(*I.getNodePtr(), *this->getNodePtr(&Node));
161
276
    return iterator(&Node);
162
276
  }
163
164
  /// Insert a range of nodes; never copies.
165
  template <class Iterator>
166
  void insert(iterator I, Iterator First, Iterator Last) {
167
    for (; First != Last; ++First)
168
      insert(I, *First);
169
  }
170
171
  /// Clone another list.
172
  template <class Cloner, class Disposer>
173
  void cloneFrom(const simple_ilist &L2, Cloner clone, Disposer dispose) {
174
    clearAndDispose(dispose);
175
    for (const_reference V : L2)
176
      push_back(*clone(V));
177
  }
178
179
  /// Remove a node by reference; never deletes.
180
  ///
181
  /// \see \a erase() for removing by iterator.
182
  /// \see \a removeAndDispose() if the node should be deleted.
183
250M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::AliasSet>::remove(llvm::AliasSet&)
Line
Count
Source
183
1.00M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::remove(llvm::MachineInstr&)
Line
Count
Source
183
41.7M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
GCNMinRegStrategy.cpp:llvm::simple_ilist<(anonymous namespace)::GCNMinRegScheduler::Candidate>::remove((anonymous namespace)::GCNMinRegScheduler::Candidate&)
Line
Count
Source
183
44.0k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
GCNILPSched.cpp:llvm::simple_ilist<(anonymous namespace)::GCNILPScheduler::Candidate>::remove((anonymous namespace)::GCNILPScheduler::Candidate&)
Line
Count
Source
183
906
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::SDNode>::remove(llvm::SDNode&)
Line
Count
Source
183
74.1M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::MachineBasicBlock>::remove(llvm::MachineBasicBlock&)
Line
Count
Source
183
3.97M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::GlobalVariable>::remove(llvm::GlobalVariable&)
Line
Count
Source
183
172k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::Function>::remove(llvm::Function&)
Line
Count
Source
183
1.66M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::Instruction>::remove(llvm::Instruction&)
Line
Count
Source
183
37.7M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::IVStrideUse>::remove(llvm::IVStrideUse&)
Line
Count
Source
183
592k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::AllAccessTag> >::remove(llvm::MemoryAccess&)
Line
Count
Source
183
9.81M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::MemoryAccess, llvm::ilist_tag<llvm::MSSAHelpers::DefsOnlyTag> >::remove(llvm::MemoryAccess&)
Line
Count
Source
183
8.35k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::IndexListEntry>::remove(llvm::IndexListEntry&)
Line
Count
Source
183
62.6M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::BasicBlock>::remove(llvm::BasicBlock&)
Line
Count
Source
183
4.74M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::GlobalAlias>::remove(llvm::GlobalAlias&)
Line
Count
Source
183
3.63k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::GlobalIFunc>::remove(llvm::GlobalIFunc&)
Line
Count
Source
183
142
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::NamedMDNode>::remove(llvm::NamedMDNode&)
Line
Count
Source
183
30.7k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::MCFragment>::remove(llvm::MCFragment&)
Line
Count
Source
183
7.12M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node>::remove(llvm::AllocatorList<llvm::yaml::Token, llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul> >::Node&)
Line
Count
Source
183
1.20M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::PredicateBase>::remove(llvm::PredicateBase&)
Line
Count
Source
183
3.15M
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<llvm::VPRecipeBase>::remove(llvm::VPRecipeBase&)
Line
Count
Source
183
328k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
llvm::simple_ilist<clang::ento::BugReport>::remove(clang::ento::BugReport&)
Line
Count
Source
183
11.3k
  void remove(reference N) { list_base_type::remove(*this->getNodePtr(&N)); }
Unexecuted instantiation: llvm::simple_ilist<lld::SimpleReference>::remove(lld::SimpleReference&)
Unexecuted instantiation: llvm::simple_ilist<lld::mach_o::normalized::TrieEdge>::remove(lld::mach_o::normalized::TrieEdge&)
184
185
  /// Remove a node by reference and dispose of it.
186
  template <class Disposer>
187
  void removeAndDispose(reference N, Disposer dispose) {
188
    remove(N);
189
    dispose(&N);
190
  }
191
192
  /// Remove a node by iterator; never deletes.
193
  ///
194
  /// \see \a remove() for removing by reference.
195
  /// \see \a eraseAndDispose() it the node should be deleted.
196
1.20M
  iterator erase(iterator I) {
197
1.20M
    assert(I != end() && "Cannot remove end of list!");
198
1.20M
    remove(*I++);
199
1.20M
    return I;
200
1.20M
  }
201
202
  /// Remove a range of nodes; never deletes.
203
  ///
204
  /// \see \a eraseAndDispose() if the nodes should be deleted.
205
  iterator erase(iterator First, iterator Last) {
206
    list_base_type::removeRange(*First.getNodePtr(), *Last.getNodePtr());
207
    return Last;
208
  }
209
210
  /// Remove a node by iterator and dispose of it.
211
  template <class Disposer>
212
1.20M
  iterator eraseAndDispose(iterator I, Disposer dispose) {
213
1.20M
    auto Next = std::next(I);
214
1.20M
    erase(I);
215
1.20M
    dispose(&*I);
216
1.20M
    return Next;
217
1.20M
  }
218
219
  /// Remove a range of nodes and dispose of them.
220
  template <class Disposer>
221
3.68k
  iterator eraseAndDispose(iterator First, iterator Last, Disposer dispose) {
222
7.47k
    while (First != Last)
223
3.78k
      First = eraseAndDispose(First, dispose);
224
3.68k
    return Last;
225
3.68k
  }
226
227
  /// Clear the list; never deletes.
228
  ///
229
  /// \see \a clearAndDispose() if the nodes should be deleted.
230
3.46M
  void clear() { Sentinel.reset(); }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::clear()
Line
Count
Source
230
3.39M
  void clear() { Sentinel.reset(); }
llvm::simple_ilist<llvm::IndexListEntry>::clear()
Line
Count
Source
230
68.4k
  void clear() { Sentinel.reset(); }
llvm::simple_ilist<lld::SimpleReference>::clear()
Line
Count
Source
230
1.35k
  void clear() { Sentinel.reset(); }
231
232
  /// Clear the list and dispose of the nodes.
233
3.68k
  template <class Disposer> void clearAndDispose(Disposer dispose) {
234
3.68k
    eraseAndDispose(begin(), end(), dispose);
235
3.68k
  }
236
237
  /// Splice in another list.
238
24
  void splice(iterator I, simple_ilist &L2) {
239
24
    splice(I, L2, L2.begin(), L2.end());
240
24
  }
241
242
  /// Splice in a node from another list.
243
  void splice(iterator I, simple_ilist &L2, iterator Node) {
244
    splice(I, L2, Node, std::next(Node));
245
  }
246
247
  /// Splice in a range of nodes from another list.
248
10.0M
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
10.0M
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
10.0M
                                   *Last.getNodePtr());
251
10.0M
  }
llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >::splice(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>, llvm::simple_ilist<llvm::MachineInstr, llvm::ilist_sentinel_tracking<true> >&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>)
Line
Count
Source
248
5.68M
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
5.68M
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
5.68M
                                   *Last.getNodePtr());
251
5.68M
  }
llvm::simple_ilist<llvm::MachineBasicBlock>::splice(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, false, false, void>, false, false>, llvm::simple_ilist<llvm::MachineBasicBlock>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, false, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, false, false, void>, false, false>)
Line
Count
Source
248
1.42M
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
1.42M
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
1.42M
                                   *Last.getNodePtr());
251
1.42M
  }
llvm::simple_ilist<llvm::BasicBlock>::splice(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::BasicBlock, false, false, void>, false, false>, llvm::simple_ilist<llvm::BasicBlock>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::BasicBlock, false, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::BasicBlock, false, false, void>, false, false>)
Line
Count
Source
248
499k
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
499k
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
499k
                                   *Last.getNodePtr());
251
499k
  }
llvm::simple_ilist<llvm::IVStrideUse>::splice(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::IVStrideUse, false, false, void>, false, false>, llvm::simple_ilist<llvm::IVStrideUse>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::IVStrideUse, false, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::IVStrideUse, false, false, void>, false, false>)
Line
Count
Source
248
24
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
24
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
24
                                   *Last.getNodePtr());
251
24
  }
llvm::simple_ilist<llvm::Instruction>::splice(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false>, llvm::simple_ilist<llvm::Instruction>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false>)
Line
Count
Source
248
2.41M
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
2.41M
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
2.41M
                                   *Last.getNodePtr());
251
2.41M
  }
llvm::simple_ilist<llvm::GlobalVariable>::splice(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::GlobalVariable, false, false, void>, false, false>, llvm::simple_ilist<llvm::GlobalVariable>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::GlobalVariable, false, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::GlobalVariable, false, false, void>, false, false>)
Line
Count
Source
248
451
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
451
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
451
                                   *Last.getNodePtr());
251
451
  }
llvm::simple_ilist<llvm::Function>::splice(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, false, false, void>, false, false>, llvm::simple_ilist<llvm::Function>&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, false, false, void>, false, false>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Function, false, false, void>, false, false>)
Line
Count
Source
248
31.1k
  void splice(iterator I, simple_ilist &, iterator First, iterator Last) {
249
31.1k
    list_base_type::transferBefore(*I.getNodePtr(), *First.getNodePtr(),
250
31.1k
                                   *Last.getNodePtr());
251
31.1k
  }
252
253
  /// Merge in another list.
254
  ///
255
  /// \pre \c this and \p RHS are sorted.
256
  ///@{
257
  void merge(simple_ilist &RHS) { merge(RHS, std::less<T>()); }
258
  template <class Compare> void merge(simple_ilist &RHS, Compare comp);
259
  ///@}
260
261
  /// Sort the list.
262
  ///@{
263
  void sort() { sort(std::less<T>()); }
264
  template <class Compare> void sort(Compare comp);
265
  ///@}
266
};
267
268
template <class T, class... Options>
269
template <class Compare>
270
346
void simple_ilist<T, Options...>::merge(simple_ilist &RHS, Compare comp) {
271
346
  if (this == &RHS || RHS.empty())
272
0
    return;
273
346
  iterator LI = begin(), LE = end();
274
346
  iterator RI = RHS.begin(), RE = RHS.end();
275
779
  while (LI != LE) {
276
490
    if (comp(*RI, *LI)) {
277
87
      // Transfer a run of at least size 1 from RHS to LHS.
278
87
      iterator RunStart = RI++;
279
87
      RI = std::find_if(RI, RE, [&](reference RV) 
{ return !comp(RV, *LI); }73
);
280
87
      splice(LI, RHS, RunStart, RI);
281
87
      if (RI == RE)
282
57
        return;
283
433
    }
284
433
    ++LI;
285
433
  }
286
346
  // Transfer the remaining RHS nodes once LHS is finished.
287
346
  splice(LE, RHS, RI, RE);
288
289
}
289
290
template <class T, class... Options>
291
template <class Compare>
292
775
void simple_ilist<T, Options...>::sort(Compare comp) {
293
775
  // Vacuously sorted.
294
775
  if (empty() || std::next(begin()) == end())
295
429
    return;
296
346
297
346
  // Split the list in the middle.
298
346
  iterator Center = begin(), End = begin();
299
840
  while (End != end() && 
++End != end()619
) {
300
494
    ++Center;
301
494
    ++End;
302
494
  }
303
346
  simple_ilist RHS;
304
346
  RHS.splice(RHS.end(), *this, Center, end());
305
346
306
346
  // Sort the sublists and merge back together.
307
346
  sort(comp);
308
346
  RHS.sort(comp);
309
346
  merge(RHS, comp);
310
346
}
311
312
} // end namespace llvm
313
314
#endif // LLVM_ADT_SIMPLE_ILIST_H