Coverage Report

Created: 2017-10-03 07:32

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h
Line
Count
Source
1
//===- llvm/CodeGen/MachineInstrBundleIterator.h ----------------*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// Defines an iterator class that bundles MachineInstr.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
15
#define LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
16
17
#include "llvm/ADT/ilist.h"
18
#include "llvm/ADT/simple_ilist.h"
19
#include <cassert>
20
#include <iterator>
21
#include <type_traits>
22
23
namespace llvm {
24
25
template <class T, bool IsReverse> struct MachineInstrBundleIteratorTraits;
26
template <class T> struct MachineInstrBundleIteratorTraits<T, false> {
27
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
28
  using instr_iterator = typename list_type::iterator;
29
  using nonconst_instr_iterator = typename list_type::iterator;
30
  using const_instr_iterator = typename list_type::const_iterator;
31
};
32
template <class T> struct MachineInstrBundleIteratorTraits<T, true> {
33
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
34
  using instr_iterator = typename list_type::reverse_iterator;
35
  using nonconst_instr_iterator = typename list_type::reverse_iterator;
36
  using const_instr_iterator = typename list_type::const_reverse_iterator;
37
};
38
template <class T> struct MachineInstrBundleIteratorTraits<const T, false> {
39
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
40
  using instr_iterator = typename list_type::const_iterator;
41
  using nonconst_instr_iterator = typename list_type::iterator;
42
  using const_instr_iterator = typename list_type::const_iterator;
43
};
44
template <class T> struct MachineInstrBundleIteratorTraits<const T, true> {
45
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
46
  using instr_iterator = typename list_type::const_reverse_iterator;
47
  using nonconst_instr_iterator = typename list_type::reverse_iterator;
48
  using const_instr_iterator = typename list_type::const_reverse_iterator;
49
};
50
51
template <bool IsReverse> struct MachineInstrBundleIteratorHelper;
52
template <> struct MachineInstrBundleIteratorHelper<false> {
53
  /// Get the beginning of the current bundle.
54
582M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
582M
    if (!I.isEnd())
56
570M
      
while (570M
I->isBundledWithPred()570M
)
57
219k
        --I;
58
582M
    return I;
59
582M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> llvm::MachineInstrBundleIteratorHelper<false>::getBundleBegin<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>)
Line
Count
Source
54
73.4M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
73.4M
    if (!I.isEnd())
56
69.6M
      
while (69.6M
I->isBundledWithPred()69.6M
)
57
6.67k
        --I;
58
73.4M
    return I;
59
73.4M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> llvm::MachineInstrBundleIteratorHelper<false>::getBundleBegin<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
54
509M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
509M
    if (!I.isEnd())
56
501M
      
while (500M
I->isBundledWithPred()501M
)
57
213k
        --I;
58
509M
    return I;
59
509M
  }
60
61
  /// Get the final node of the current bundle.
62
1.32G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
1.32G
    if (!I.isEnd())
64
1.32G
      
while (1.32G
I->isBundledWithSucc()1.32G
)
65
127k
        ++I;
66
1.32G
    return I;
67
1.32G
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> llvm::MachineInstrBundleIteratorHelper<false>::getBundleFinal<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
62
1.12G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
1.12G
    if (!I.isEnd())
64
1.12G
      
while (1.12G
I->isBundledWithSucc()1.12G
)
65
61.1k
        ++I;
66
1.12G
    return I;
67
1.12G
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> llvm::MachineInstrBundleIteratorHelper<false>::getBundleFinal<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>)
Line
Count
Source
62
208M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
208M
    if (!I.isEnd())
64
208M
      
while (208M
I->isBundledWithSucc()208M
)
65
66.6k
        ++I;
66
208M
    return I;
67
208M
  }
68
69
  /// Increment forward ilist iterator.
70
1.32G
  template <class Iterator> static void increment(Iterator &I) {
71
1.32G
    I = std::next(getBundleFinal(I));
72
1.32G
  }
void llvm::MachineInstrBundleIteratorHelper<false>::increment<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
70
1.12G
  template <class Iterator> static void increment(Iterator &I) {
71
1.12G
    I = std::next(getBundleFinal(I));
72
1.12G
  }
void llvm::MachineInstrBundleIteratorHelper<false>::increment<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>&)
Line
Count
Source
70
208M
  template <class Iterator> static void increment(Iterator &I) {
71
208M
    I = std::next(getBundleFinal(I));
72
208M
  }
73
74
  /// Decrement forward ilist iterator.
75
466M
  template <class Iterator> static void decrement(Iterator &I) {
76
466M
    I = getBundleBegin(std::prev(I));
77
466M
  }
void llvm::MachineInstrBundleIteratorHelper<false>::decrement<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>&)
Line
Count
Source
75
44.9M
  template <class Iterator> static void decrement(Iterator &I) {
76
44.9M
    I = getBundleBegin(std::prev(I));
77
44.9M
  }
void llvm::MachineInstrBundleIteratorHelper<false>::decrement<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
75
421M
  template <class Iterator> static void decrement(Iterator &I) {
76
421M
    I = getBundleBegin(std::prev(I));
77
421M
  }
78
};
79
80
template <> struct MachineInstrBundleIteratorHelper<true> {
81
  /// Get the beginning of the current bundle.
82
116M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
116M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
116M
               I.getReverse())
85
116M
        .getReverse();
86
116M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> llvm::MachineInstrBundleIteratorHelper<true>::getBundleBegin<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
82
87.6M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
87.6M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
87.6M
               I.getReverse())
85
87.6M
        .getReverse();
86
87.6M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true> llvm::MachineInstrBundleIteratorHelper<true>::getBundleBegin<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>)
Line
Count
Source
82
28.4M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
28.4M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
28.4M
               I.getReverse())
85
28.4M
        .getReverse();
86
28.4M
  }
87
88
  /// Get the final node of the current bundle.
89
1.26k
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
90
1.26k
    return MachineInstrBundleIteratorHelper<false>::getBundleFinal(
91
1.26k
               I.getReverse())
92
1.26k
        .getReverse();
93
1.26k
  }
94
95
  /// Increment reverse ilist iterator.
96
103M
  template <class Iterator> static void increment(Iterator &I) {
97
103M
    I = getBundleBegin(std::next(I));
98
103M
  }
void llvm::MachineInstrBundleIteratorHelper<true>::increment<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>&)
Line
Count
Source
96
24.6M
  template <class Iterator> static void increment(Iterator &I) {
97
24.6M
    I = getBundleBegin(std::next(I));
98
24.6M
  }
void llvm::MachineInstrBundleIteratorHelper<true>::increment<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>&)
Line
Count
Source
96
78.8M
  template <class Iterator> static void increment(Iterator &I) {
97
78.8M
    I = getBundleBegin(std::next(I));
98
78.8M
  }
99
100
  /// Decrement reverse ilist iterator.
101
1.26k
  template <class Iterator> static void decrement(Iterator &I) {
102
1.26k
    I = std::prev(getBundleFinal(I));
103
1.26k
  }
104
};
105
106
/// MachineBasicBlock iterator that automatically skips over MIs that are
107
/// inside bundles (i.e. walk top level MIs only).
108
template <typename Ty, bool IsReverse = false>
109
class MachineInstrBundleIterator : MachineInstrBundleIteratorHelper<IsReverse> {
110
  using Traits = MachineInstrBundleIteratorTraits<Ty, IsReverse>;
111
  using instr_iterator = typename Traits::instr_iterator;
112
113
  instr_iterator MII;
114
115
public:
116
  using value_type = typename instr_iterator::value_type;
117
  using difference_type = typename instr_iterator::difference_type;
118
  using pointer = typename instr_iterator::pointer;
119
  using reference = typename instr_iterator::reference;
120
  using const_pointer = typename instr_iterator::const_pointer;
121
  using const_reference = typename instr_iterator::const_reference;
122
  using iterator_category = std::bidirectional_iterator_tag;
123
124
private:
125
  using nonconst_instr_iterator = typename Traits::nonconst_instr_iterator;
126
  using const_instr_iterator = typename Traits::const_instr_iterator;
127
  using nonconst_iterator =
128
      MachineInstrBundleIterator<typename nonconst_instr_iterator::value_type,
129
                                 IsReverse>;
130
  using reverse_iterator = MachineInstrBundleIterator<Ty, !IsReverse>;
131
132
public:
133
1.66G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.66G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.66G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.66G
           "bundled MI");
137
1.66G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>)
Line
Count
Source
133
7.70M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
7.70M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
7.70M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
7.70M
           "bundled MI");
137
7.70M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>)
Line
Count
Source
133
108M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
108M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
108M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
108M
           "bundled MI");
137
108M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>)
Line
Count
Source
133
1.52G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.52G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.52G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.52G
           "bundled MI");
137
1.52G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
133
19.2M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
19.2M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
19.2M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
19.2M
           "bundled MI");
137
19.2M
  }
138
139
17.9M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
17.9M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
17.9M
                                      "MachineInstrBundleIterator with a "
142
17.9M
                                      "bundled MI");
143
17.9M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
139
15.1M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
15.1M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
15.1M
                                      "MachineInstrBundleIterator with a "
142
15.1M
                                      "bundled MI");
143
15.1M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
139
263
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
263
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
263
                                      "MachineInstrBundleIterator with a "
142
263
                                      "bundled MI");
143
263
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
139
2.78M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
2.78M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
2.78M
                                      "MachineInstrBundleIterator with a "
142
2.78M
                                      "bundled MI");
143
2.78M
  }
144
145
125M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
125M
    // FIXME: This conversion should be explicit.
147
125M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
125M
                                                "MachineInstrBundleIterator "
149
125M
                                                "with a bundled MI");
150
125M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
254
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
254
    // FIXME: This conversion should be explicit.
147
254
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
254
                                                "MachineInstrBundleIterator "
149
254
                                                "with a bundled MI");
150
254
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
1.61k
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
1.61k
    // FIXME: This conversion should be explicit.
147
1.61k
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
1.61k
                                                "MachineInstrBundleIterator "
149
1.61k
                                                "with a bundled MI");
150
1.61k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
903k
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
903k
    // FIXME: This conversion should be explicit.
147
903k
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
903k
                                                "MachineInstrBundleIterator "
149
903k
                                                "with a bundled MI");
150
903k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
124M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
124M
    // FIXME: This conversion should be explicit.
147
124M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
124M
                                                "MachineInstrBundleIterator "
149
124M
                                                "with a bundled MI");
150
124M
  }
151
152
  // Template allows conversion from const to nonconst.
153
  template <class OtherTy>
154
  MachineInstrBundleIterator(
155
      const MachineInstrBundleIterator<OtherTy, IsReverse> &I,
156
      typename std::enable_if<std::is_convertible<OtherTy *, Ty *>::value,
157
                              void *>::type = nullptr)
158
75.6M
      : MII(I.getInstrIterator()) {}
159
160
28.0M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator()
Line
Count
Source
160
26.3M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator()
Line
Count
Source
160
12.3k
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator()
Line
Count
Source
160
1.72M
  MachineInstrBundleIterator() : MII(nullptr) {}
161
162
  /// Explicit conversion between forward/reverse iterators.
163
  ///
164
  /// Translate between forward and reverse iterators without changing range
165
  /// boundaries.  The resulting iterator will dereference (and have a handle)
166
  /// to the previous node, which is somewhat unexpected; but converting the
167
  /// two endpoints in a range will give the same range in reverse.
168
  ///
169
  /// This matches std::reverse_iterator conversions.
170
  explicit MachineInstrBundleIterator(
171
      const MachineInstrBundleIterator<Ty, !IsReverse> &I)
172
13
      : MachineInstrBundleIterator(++I.getReverse()) {}
173
174
  /// Get the bundle iterator for the given instruction's bundle.
175
12.6M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
12.6M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
12.6M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getAtBundleBegin(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
175
8.82M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
8.82M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
8.82M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::getAtBundleBegin(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>)
Line
Count
Source
175
3.84M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
3.84M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
3.84M
  }
178
179
2.76G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator*() const
Line
Count
Source
179
2.34G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator*() const
Line
Count
Source
179
84.5M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator*() const
Line
Count
Source
179
315M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator*() const
Line
Count
Source
179
24.6M
  reference operator*() const { return *MII; }
180
807M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator->() const
Line
Count
Source
180
764M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator->() const
Line
Count
Source
180
45.3k
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator->() const
Line
Count
Source
180
36.3M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator->() const
Line
Count
Source
180
6.75M
  pointer operator->() const { return &operator*(); }
181
182
  /// Check for null.
183
  bool isValid() const { return MII.getNodePtr(); }
184
185
  friend bool operator==(const MachineInstrBundleIterator &L,
186
2.35G
                         const MachineInstrBundleIterator &R) {
187
2.35G
    return L.MII == R.MII;
188
2.35G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
186
1.94G
                         const MachineInstrBundleIterator &R) {
187
1.94G
    return L.MII == R.MII;
188
1.94G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
186
86.6M
                         const MachineInstrBundleIterator &R) {
187
86.6M
    return L.MII == R.MII;
188
86.6M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
186
28.4M
                         const MachineInstrBundleIterator &R) {
187
28.4M
    return L.MII == R.MII;
188
28.4M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
186
297M
                         const MachineInstrBundleIterator &R) {
187
297M
    return L.MII == R.MII;
188
297M
  }
189
  friend bool operator==(const MachineInstrBundleIterator &L,
190
48.9k
                         const const_instr_iterator &R) {
191
48.9k
    return L.MII == R; // Avoid assertion about validity of R.
192
48.9k
  }
193
  friend bool operator==(const const_instr_iterator &L,
194
1.86M
                         const MachineInstrBundleIterator &R) {
195
1.86M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.86M
  }
llvm::operator==(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
194
1.55M
                         const MachineInstrBundleIterator &R) {
195
1.55M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.55M
  }
llvm::operator==(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
194
308k
                         const MachineInstrBundleIterator &R) {
195
308k
    return L == R.MII; // Avoid assertion about validity of L.
196
308k
  }
197
  friend bool operator==(const MachineInstrBundleIterator &L,
198
49.4k
                         const nonconst_instr_iterator &R) {
199
49.4k
    return L.MII == R; // Avoid assertion about validity of R.
200
49.4k
  }
201
  friend bool operator==(const nonconst_instr_iterator &L,
202
4.96k
                         const MachineInstrBundleIterator &R) {
203
4.96k
    return L == R.MII; // Avoid assertion about validity of L.
204
4.96k
  }
205
48.9k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
206
48.9k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
207
48.9k
  }
208
308k
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
209
308k
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
210
308k
  }
211
  friend bool operator==(const MachineInstrBundleIterator &L,
212
                         const_reference R) {
213
    return L == &R; // Avoid assertion about validity of R.
214
  }
215
  friend bool operator==(const_reference L,
216
308k
                         const MachineInstrBundleIterator &R) {
217
308k
    return &L == R; // Avoid assertion about validity of L.
218
308k
  }
219
220
  friend bool operator!=(const MachineInstrBundleIterator &L,
221
1.93G
                         const MachineInstrBundleIterator &R) {
222
1.93G
    return !(L == R);
223
1.93G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
221
1.54G
                         const MachineInstrBundleIterator &R) {
222
1.54G
    return !(L == R);
223
1.54G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
221
276M
                         const MachineInstrBundleIterator &R) {
222
276M
    return !(L == R);
223
276M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
221
86.5M
                         const MachineInstrBundleIterator &R) {
222
86.5M
    return !(L == R);
223
86.5M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
221
28.4M
                         const MachineInstrBundleIterator &R) {
222
28.4M
    return !(L == R);
223
28.4M
  }
224
  friend bool operator!=(const MachineInstrBundleIterator &L,
225
                         const const_instr_iterator &R) {
226
    return !(L == R);
227
  }
228
  friend bool operator!=(const const_instr_iterator &L,
229
1.55M
                         const MachineInstrBundleIterator &R) {
230
1.55M
    return !(L == R);
231
1.55M
  }
232
  friend bool operator!=(const MachineInstrBundleIterator &L,
233
29.0k
                         const nonconst_instr_iterator &R) {
234
29.0k
    return !(L == R);
235
29.0k
  }
236
  friend bool operator!=(const nonconst_instr_iterator &L,
237
4.85k
                         const MachineInstrBundleIterator &R) {
238
4.85k
    return !(L == R);
239
4.85k
  }
240
46.4k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
241
46.4k
    return !(L == R);
242
46.4k
  }
243
  friend bool operator!=(const_pointer L, const MachineInstrBundleIterator &R) {
244
    return !(L == R);
245
  }
246
  friend bool operator!=(const MachineInstrBundleIterator &L,
247
                         const_reference R) {
248
    return !(L == R);
249
  }
250
  friend bool operator!=(const_reference L,
251
                         const MachineInstrBundleIterator &R) {
252
    return !(L == R);
253
  }
254
255
  // Increment and decrement operators...
256
466M
  MachineInstrBundleIterator &operator--() {
257
466M
    this->decrement(MII);
258
466M
    return *this;
259
466M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--()
Line
Count
Source
256
44.9M
  MachineInstrBundleIterator &operator--() {
257
44.9M
    this->decrement(MII);
258
44.9M
    return *this;
259
44.9M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--()
Line
Count
Source
256
421M
  MachineInstrBundleIterator &operator--() {
257
421M
    this->decrement(MII);
258
421M
    return *this;
259
421M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator--()
Line
Count
Source
256
1.26k
  MachineInstrBundleIterator &operator--() {
257
1.26k
    this->decrement(MII);
258
1.26k
    return *this;
259
1.26k
  }
260
1.43G
  MachineInstrBundleIterator &operator++() {
261
1.43G
    this->increment(MII);
262
1.43G
    return *this;
263
1.43G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++()
Line
Count
Source
260
1.12G
  MachineInstrBundleIterator &operator++() {
261
1.12G
    this->increment(MII);
262
1.12G
    return *this;
263
1.12G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++()
Line
Count
Source
260
208M
  MachineInstrBundleIterator &operator++() {
261
208M
    this->increment(MII);
262
208M
    return *this;
263
208M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++()
Line
Count
Source
260
24.6M
  MachineInstrBundleIterator &operator++() {
261
24.6M
    this->increment(MII);
262
24.6M
    return *this;
263
24.6M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++()
Line
Count
Source
260
78.8M
  MachineInstrBundleIterator &operator++() {
261
78.8M
    this->increment(MII);
262
78.8M
    return *this;
263
78.8M
  }
264
44.9k
  MachineInstrBundleIterator operator--(int) {
265
44.9k
    MachineInstrBundleIterator Temp = *this;
266
44.9k
    --*this;
267
44.9k
    return Temp;
268
44.9k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--(int)
Line
Count
Source
264
138
  MachineInstrBundleIterator operator--(int) {
265
138
    MachineInstrBundleIterator Temp = *this;
266
138
    --*this;
267
138
    return Temp;
268
138
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--(int)
Line
Count
Source
264
44.7k
  MachineInstrBundleIterator operator--(int) {
265
44.7k
    MachineInstrBundleIterator Temp = *this;
266
44.7k
    --*this;
267
44.7k
    return Temp;
268
44.7k
  }
269
167M
  MachineInstrBundleIterator operator++(int) {
270
167M
    MachineInstrBundleIterator Temp = *this;
271
167M
    ++*this;
272
167M
    return Temp;
273
167M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++(int)
Line
Count
Source
269
566k
  MachineInstrBundleIterator operator++(int) {
270
566k
    MachineInstrBundleIterator Temp = *this;
271
566k
    ++*this;
272
566k
    return Temp;
273
566k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++(int)
Line
Count
Source
269
91.3M
  MachineInstrBundleIterator operator++(int) {
270
91.3M
    MachineInstrBundleIterator Temp = *this;
271
91.3M
    ++*this;
272
91.3M
    return Temp;
273
91.3M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++(int)
Line
Count
Source
269
75.2M
  MachineInstrBundleIterator operator++(int) {
270
75.2M
    MachineInstrBundleIterator Temp = *this;
271
75.2M
    ++*this;
272
75.2M
    return Temp;
273
75.2M
  }
274
275
279M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getInstrIterator() const
Line
Count
Source
275
279M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getInstrIterator() const
Line
Count
Source
275
1.99k
  instr_iterator getInstrIterator() const { return MII; }
276
277
29.1M
  nonconst_iterator getNonConstIterator() const { return MII.getNonConst(); }
278
279
  /// Get a reverse iterator to the same node.
280
  ///
281
  /// Gives a reverse iterator that will dereference (and have a handle) to the
282
  /// same node.  Converting the endpoint iterators in a range will give a
283
  /// different range; for range operations, use the explicit conversions.
284
72.2k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getReverse() const
Line
Count
Source
284
45.6k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getReverse() const
Line
Count
Source
284
15.8k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getReverse() const
Line
Count
Source
284
10.7k
  reverse_iterator getReverse() const { return MII.getReverse(); }
285
};
286
287
} // end namespace llvm
288
289
#endif // LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H