Coverage Report

Created: 2019-02-20 07:29

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h
Line
Count
Source (jump to first uncovered line)
1
//===- llvm/CodeGen/MachineInstrBundleIterator.h ----------------*- 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
// Defines an iterator class that bundles MachineInstr.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
14
#define LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
15
16
#include "llvm/ADT/ilist.h"
17
#include "llvm/ADT/simple_ilist.h"
18
#include <cassert>
19
#include <iterator>
20
#include <type_traits>
21
22
namespace llvm {
23
24
template <class T, bool IsReverse> struct MachineInstrBundleIteratorTraits;
25
template <class T> struct MachineInstrBundleIteratorTraits<T, false> {
26
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
27
  using instr_iterator = typename list_type::iterator;
28
  using nonconst_instr_iterator = typename list_type::iterator;
29
  using const_instr_iterator = typename list_type::const_iterator;
30
};
31
template <class T> struct MachineInstrBundleIteratorTraits<T, true> {
32
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
33
  using instr_iterator = typename list_type::reverse_iterator;
34
  using nonconst_instr_iterator = typename list_type::reverse_iterator;
35
  using const_instr_iterator = typename list_type::const_reverse_iterator;
36
};
37
template <class T> struct MachineInstrBundleIteratorTraits<const T, false> {
38
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
39
  using instr_iterator = typename list_type::const_iterator;
40
  using nonconst_instr_iterator = typename list_type::iterator;
41
  using const_instr_iterator = typename list_type::const_iterator;
42
};
43
template <class T> struct MachineInstrBundleIteratorTraits<const T, true> {
44
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
45
  using instr_iterator = typename list_type::const_reverse_iterator;
46
  using nonconst_instr_iterator = typename list_type::reverse_iterator;
47
  using const_instr_iterator = typename list_type::const_reverse_iterator;
48
};
49
50
template <bool IsReverse> struct MachineInstrBundleIteratorHelper;
51
0
template <> struct MachineInstrBundleIteratorHelper<false> {
52
  /// Get the beginning of the current bundle.
53
526M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
54
526M
    if (!I.isEnd())
55
514M
      
while (513M
I->isBundledWithPred())
56
296k
        --I;
57
526M
    return I;
58
526M
  }
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
53
469M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
54
469M
    if (!I.isEnd())
55
460M
      
while (459M
I->isBundledWithPred())
56
282k
        --I;
57
469M
    return I;
58
469M
  }
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
53
56.3M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
54
56.3M
    if (!I.isEnd())
55
54.0M
      
while (54.0M
I->isBundledWithPred())
56
14.7k
        --I;
57
56.3M
    return I;
58
56.3M
  }
59
60
  /// Get the final node of the current bundle.
61
1.22G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
62
1.22G
    if (!I.isEnd())
63
1.22G
      
while (1.22G
I->isBundledWithSucc())
64
194k
        ++I;
65
1.22G
    return I;
66
1.22G
  }
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
61
1.03G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
62
1.03G
    if (!I.isEnd())
63
1.03G
      
while (1.03G
I->isBundledWithSucc())
64
137k
        ++I;
65
1.03G
    return I;
66
1.03G
  }
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
61
182M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
62
182M
    if (!I.isEnd())
63
182M
      
while (182M
I->isBundledWithSucc())
64
57.0k
        ++I;
65
182M
    return I;
66
182M
  }
67
68
  /// Increment forward ilist iterator.
69
1.22G
  template <class Iterator> static void increment(Iterator &I) {
70
1.22G
    I = std::next(getBundleFinal(I));
71
1.22G
  }
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
69
1.03G
  template <class Iterator> static void increment(Iterator &I) {
70
1.03G
    I = std::next(getBundleFinal(I));
71
1.03G
  }
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
69
182M
  template <class Iterator> static void increment(Iterator &I) {
70
182M
    I = std::next(getBundleFinal(I));
71
182M
  }
72
73
  /// Decrement forward ilist iterator.
74
400M
  template <class Iterator> static void decrement(Iterator &I) {
75
400M
    I = getBundleBegin(std::prev(I));
76
400M
  }
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
74
362M
  template <class Iterator> static void decrement(Iterator &I) {
75
362M
    I = getBundleBegin(std::prev(I));
76
362M
  }
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
74
37.9M
  template <class Iterator> static void decrement(Iterator &I) {
75
37.9M
    I = getBundleBegin(std::prev(I));
76
37.9M
  }
77
};
78
79
template <> struct MachineInstrBundleIteratorHelper<true> {
80
  /// Get the beginning of the current bundle.
81
125M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
82
125M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
83
125M
               I.getReverse())
84
125M
        .getReverse();
85
125M
  }
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
81
18.4M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
82
18.4M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
83
18.4M
               I.getReverse())
84
18.4M
        .getReverse();
85
18.4M
  }
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
81
107M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
82
107M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
83
107M
               I.getReverse())
84
107M
        .getReverse();
85
107M
  }
86
87
  /// Get the final node of the current bundle.
88
355
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
89
355
    return MachineInstrBundleIteratorHelper<false>::getBundleFinal(
90
355
               I.getReverse())
91
355
        .getReverse();
92
355
  }
93
94
  /// Increment reverse ilist iterator.
95
113M
  template <class Iterator> static void increment(Iterator &I) {
96
113M
    I = getBundleBegin(std::next(I));
97
113M
  }
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
95
16.1M
  template <class Iterator> static void increment(Iterator &I) {
96
16.1M
    I = getBundleBegin(std::next(I));
97
16.1M
  }
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
95
96.8M
  template <class Iterator> static void increment(Iterator &I) {
96
96.8M
    I = getBundleBegin(std::next(I));
97
96.8M
  }
98
99
  /// Decrement reverse ilist iterator.
100
355
  template <class Iterator> static void decrement(Iterator &I) {
101
355
    I = std::prev(getBundleFinal(I));
102
355
  }
103
};
104
105
/// MachineBasicBlock iterator that automatically skips over MIs that are
106
/// inside bundles (i.e. walk top level MIs only).
107
template <typename Ty, bool IsReverse = false>
108
0
class MachineInstrBundleIterator : MachineInstrBundleIteratorHelper<IsReverse> {
Unexecuted instantiation: llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Unexecuted instantiation: llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
109
  using Traits = MachineInstrBundleIteratorTraits<Ty, IsReverse>;
110
  using instr_iterator = typename Traits::instr_iterator;
111
112
  instr_iterator MII;
113
114
public:
115
  using value_type = typename instr_iterator::value_type;
116
  using difference_type = typename instr_iterator::difference_type;
117
  using pointer = typename instr_iterator::pointer;
118
  using reference = typename instr_iterator::reference;
119
  using const_pointer = typename instr_iterator::const_pointer;
120
  using const_reference = typename instr_iterator::const_reference;
121
  using iterator_category = std::bidirectional_iterator_tag;
122
123
private:
124
  using nonconst_instr_iterator = typename Traits::nonconst_instr_iterator;
125
  using const_instr_iterator = typename Traits::const_instr_iterator;
126
  using nonconst_iterator =
127
      MachineInstrBundleIterator<typename nonconst_instr_iterator::value_type,
128
                                 IsReverse>;
129
  using reverse_iterator = MachineInstrBundleIterator<Ty, !IsReverse>;
130
131
public:
132
1.40G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
1.40G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
1.40G
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
1.40G
           "bundled MI");
136
1.40G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>)
Line
Count
Source
132
1.28G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
1.28G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
1.28G
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
1.28G
           "bundled MI");
136
1.28G
  }
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
132
90.5M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
90.5M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
90.5M
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
90.5M
           "bundled MI");
136
90.5M
  }
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
132
4.60M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
4.60M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
4.60M
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
4.60M
           "bundled MI");
136
4.60M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
132
24.5M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
24.5M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
24.5M
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
24.5M
           "bundled MI");
136
24.5M
  }
137
138
24.7M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
24.7M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
24.7M
                                      "MachineInstrBundleIterator with a "
141
24.7M
                                      "bundled MI");
142
24.7M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
138
22.2M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
22.2M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
22.2M
                                      "MachineInstrBundleIterator with a "
141
22.2M
                                      "bundled MI");
142
22.2M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
138
2.41M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
2.41M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
2.41M
                                      "MachineInstrBundleIterator with a "
141
2.41M
                                      "bundled MI");
142
2.41M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
138
16.0k
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
16.0k
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
16.0k
                                      "MachineInstrBundleIterator with a "
141
16.0k
                                      "bundled MI");
142
16.0k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
138
216
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
216
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
216
                                      "MachineInstrBundleIterator with a "
141
216
                                      "bundled MI");
142
216
  }
143
144
95.8M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
95.8M
    // FIXME: This conversion should be explicit.
146
95.8M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
95.8M
                                                "MachineInstrBundleIterator "
148
95.8M
                                                "with a bundled MI");
149
95.8M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
144
93.0M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
93.0M
    // FIXME: This conversion should be explicit.
146
93.0M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
93.0M
                                                "MachineInstrBundleIterator "
148
93.0M
                                                "with a bundled MI");
149
93.0M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
144
2.79M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
2.79M
    // FIXME: This conversion should be explicit.
146
2.79M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
2.79M
                                                "MachineInstrBundleIterator "
148
2.79M
                                                "with a bundled MI");
149
2.79M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
144
7.70k
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
7.70k
    // FIXME: This conversion should be explicit.
146
7.70k
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
7.70k
                                                "MachineInstrBundleIterator "
148
7.70k
                                                "with a bundled MI");
149
7.70k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
144
314
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
314
    // FIXME: This conversion should be explicit.
146
314
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
314
                                                "MachineInstrBundleIterator "
148
314
                                                "with a bundled MI");
149
314
  }
150
151
  // Template allows conversion from const to nonconst.
152
  template <class OtherTy>
153
  MachineInstrBundleIterator(
154
      const MachineInstrBundleIterator<OtherTy, IsReverse> &I,
155
      typename std::enable_if<std::is_convertible<OtherTy *, Ty *>::value,
156
                              void *>::type = nullptr)
157
62.2M
      : MII(I.getInstrIterator()) {}
158
159
31.0M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator()
Line
Count
Source
159
29.6M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator()
Line
Count
Source
159
1.38M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator()
Line
Count
Source
159
13.6k
  MachineInstrBundleIterator() : MII(nullptr) {}
160
161
  /// Explicit conversion between forward/reverse iterators.
162
  ///
163
  /// Translate between forward and reverse iterators without changing range
164
  /// boundaries.  The resulting iterator will dereference (and have a handle)
165
  /// to the previous node, which is somewhat unexpected; but converting the
166
  /// two endpoints in a range will give the same range in reverse.
167
  ///
168
  /// This matches std::reverse_iterator conversions.
169
  explicit MachineInstrBundleIterator(
170
      const MachineInstrBundleIterator<Ty, !IsReverse> &I)
171
336
      : MachineInstrBundleIterator(++I.getReverse()) {}
172
173
  /// Get the bundle iterator for the given instruction's bundle.
174
12.7M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
175
12.7M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
176
12.7M
  }
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
174
2.25M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
175
2.25M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
176
2.25M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getAtBundleBegin(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
174
10.4M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
175
10.4M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
176
10.4M
  }
177
178
2.61G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator*() const
Line
Count
Source
178
2.22G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator*() const
Line
Count
Source
178
279M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator*() const
Line
Count
Source
178
16.3M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator*() const
Line
Count
Source
178
101M
  reference operator*() const { return *MII; }
179
729M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator->() const
Line
Count
Source
179
691M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator->() const
Line
Count
Source
179
32.8M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator->() const
Line
Count
Source
179
4.66M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator->() const
Line
Count
Source
179
226k
  pointer operator->() const { return &operator*(); }
180
181
  /// Check for null.
182
0
  bool isValid() const { return MII.getNodePtr(); }
183
184
  friend bool operator==(const MachineInstrBundleIterator &L,
185
2.16G
                         const MachineInstrBundleIterator &R) {
186
2.16G
    return L.MII == R.MII;
187
2.16G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
185
1.78G
                         const MachineInstrBundleIterator &R) {
186
1.78G
    return L.MII == R.MII;
187
1.78G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
185
251M
                         const MachineInstrBundleIterator &R) {
186
251M
    return L.MII == R.MII;
187
251M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
185
106M
                         const MachineInstrBundleIterator &R) {
186
106M
    return L.MII == R.MII;
187
106M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
185
18.4M
                         const MachineInstrBundleIterator &R) {
186
18.4M
    return L.MII == R.MII;
187
18.4M
  }
188
  friend bool operator==(const MachineInstrBundleIterator &L,
189
9.23k
                         const const_instr_iterator &R) {
190
9.23k
    return L.MII == R; // Avoid assertion about validity of R.
191
9.23k
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> const&)
Line
Count
Source
189
9.20k
                         const const_instr_iterator &R) {
190
9.20k
    return L.MII == R; // Avoid assertion about validity of R.
191
9.20k
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> const&)
Line
Count
Source
189
35
                         const const_instr_iterator &R) {
190
35
    return L.MII == R; // Avoid assertion about validity of R.
191
35
  }
192
  friend bool operator==(const const_instr_iterator &L,
193
13.2M
                         const MachineInstrBundleIterator &R) {
194
13.2M
    return L == R.MII; // Avoid assertion about validity of L.
195
13.2M
  }
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
193
260k
                         const MachineInstrBundleIterator &R) {
194
260k
    return L == R.MII; // Avoid assertion about validity of L.
195
260k
  }
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
193
13.0M
                         const MachineInstrBundleIterator &R) {
194
13.0M
    return L == R.MII; // Avoid assertion about validity of L.
195
13.0M
  }
196
  friend bool operator==(const MachineInstrBundleIterator &L,
197
78.8k
                         const nonconst_instr_iterator &R) {
198
78.8k
    return L.MII == R; // Avoid assertion about validity of R.
199
78.8k
  }
200
  friend bool operator==(const nonconst_instr_iterator &L,
201
534k
                         const MachineInstrBundleIterator &R) {
202
534k
    return L == R.MII; // Avoid assertion about validity of L.
203
534k
  }
llvm::operator==(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
201
513k
                         const MachineInstrBundleIterator &R) {
202
513k
    return L == R.MII; // Avoid assertion about validity of L.
203
513k
  }
llvm::operator==(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
201
21.6k
                         const MachineInstrBundleIterator &R) {
202
21.6k
    return L == R.MII; // Avoid assertion about validity of L.
203
21.6k
  }
204
9.22k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
205
9.22k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
206
9.22k
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstr const*)
Line
Count
Source
204
9.20k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
205
9.20k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
206
9.20k
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstr const*)
Line
Count
Source
204
20
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
205
20
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
206
20
  }
207
11.4M
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
208
11.4M
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
209
11.4M
  }
llvm::operator==(llvm::MachineInstr const*, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
207
260k
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
208
260k
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
209
260k
  }
llvm::operator==(llvm::MachineInstr const*, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
207
11.1M
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
208
11.1M
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
209
11.1M
  }
210
  friend bool operator==(const MachineInstrBundleIterator &L,
211
102
                         const_reference R) {
212
102
    return L == &R; // Avoid assertion about validity of R.
213
102
  }
214
  friend bool operator==(const_reference L,
215
258k
                         const MachineInstrBundleIterator &R) {
216
258k
    return &L == R; // Avoid assertion about validity of L.
217
258k
  }
218
219
  friend bool operator!=(const MachineInstrBundleIterator &L,
220
1.79G
                         const MachineInstrBundleIterator &R) {
221
1.79G
    return !(L == R);
222
1.79G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
220
1.44G
                         const MachineInstrBundleIterator &R) {
221
1.44G
    return !(L == R);
222
1.44G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
220
106M
                         const MachineInstrBundleIterator &R) {
221
106M
    return !(L == R);
222
106M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
220
18.4M
                         const MachineInstrBundleIterator &R) {
221
18.4M
    return !(L == R);
222
18.4M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
220
229M
                         const MachineInstrBundleIterator &R) {
221
229M
    return !(L == R);
222
229M
  }
223
  friend bool operator!=(const MachineInstrBundleIterator &L,
224
                         const const_instr_iterator &R) {
225
    return !(L == R);
226
  }
227
  friend bool operator!=(const const_instr_iterator &L,
228
1.84M
                         const MachineInstrBundleIterator &R) {
229
1.84M
    return !(L == R);
230
1.84M
  }
231
  friend bool operator!=(const MachineInstrBundleIterator &L,
232
34.0k
                         const nonconst_instr_iterator &R) {
233
34.0k
    return !(L == R);
234
34.0k
  }
235
  friend bool operator!=(const nonconst_instr_iterator &L,
236
517k
                         const MachineInstrBundleIterator &R) {
237
517k
    return !(L == R);
238
517k
  }
llvm::operator!=(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
236
513k
                         const MachineInstrBundleIterator &R) {
237
513k
    return !(L == R);
238
513k
  }
llvm::operator!=(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
236
4.80k
                         const MachineInstrBundleIterator &R) {
237
4.80k
    return !(L == R);
238
4.80k
  }
239
7.90k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
240
7.90k
    return !(L == R);
241
7.90k
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstr const*)
Line
Count
Source
239
7.88k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
240
7.88k
    return !(L == R);
241
7.88k
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstr const*)
Line
Count
Source
239
20
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
240
20
    return !(L == R);
241
20
  }
242
11.0M
  friend bool operator!=(const_pointer L, const MachineInstrBundleIterator &R) {
243
11.0M
    return !(L == R);
244
11.0M
  }
245
  friend bool operator!=(const MachineInstrBundleIterator &L,
246
                         const_reference R) {
247
    return !(L == R);
248
  }
249
  friend bool operator!=(const_reference L,
250
                         const MachineInstrBundleIterator &R) {
251
    return !(L == R);
252
  }
253
254
  // Increment and decrement operators...
255
400M
  MachineInstrBundleIterator &operator--() {
256
400M
    this->decrement(MII);
257
400M
    return *this;
258
400M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--()
Line
Count
Source
255
362M
  MachineInstrBundleIterator &operator--() {
256
362M
    this->decrement(MII);
257
362M
    return *this;
258
362M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator--()
Line
Count
Source
255
355
  MachineInstrBundleIterator &operator--() {
256
355
    this->decrement(MII);
257
355
    return *this;
258
355
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--()
Line
Count
Source
255
37.9M
  MachineInstrBundleIterator &operator--() {
256
37.9M
    this->decrement(MII);
257
37.9M
    return *this;
258
37.9M
  }
259
1.33G
  MachineInstrBundleIterator &operator++() {
260
1.33G
    this->increment(MII);
261
1.33G
    return *this;
262
1.33G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++()
Line
Count
Source
259
1.03G
  MachineInstrBundleIterator &operator++() {
260
1.03G
    this->increment(MII);
261
1.03G
    return *this;
262
1.03G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++()
Line
Count
Source
259
182M
  MachineInstrBundleIterator &operator++() {
260
182M
    this->increment(MII);
261
182M
    return *this;
262
182M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++()
Line
Count
Source
259
16.1M
  MachineInstrBundleIterator &operator++() {
260
16.1M
    this->increment(MII);
261
16.1M
    return *this;
262
16.1M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++()
Line
Count
Source
259
96.8M
  MachineInstrBundleIterator &operator++() {
260
96.8M
    this->increment(MII);
261
96.8M
    return *this;
262
96.8M
  }
263
46.5k
  MachineInstrBundleIterator operator--(int) {
264
46.5k
    MachineInstrBundleIterator Temp = *this;
265
46.5k
    --*this;
266
46.5k
    return Temp;
267
46.5k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--(int)
Line
Count
Source
263
46.3k
  MachineInstrBundleIterator operator--(int) {
264
46.3k
    MachineInstrBundleIterator Temp = *this;
265
46.3k
    --*this;
266
46.3k
    return Temp;
267
46.3k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--(int)
Line
Count
Source
263
192
  MachineInstrBundleIterator operator--(int) {
264
192
    MachineInstrBundleIterator Temp = *this;
265
192
    --*this;
266
192
    return Temp;
267
192
  }
268
129M
  MachineInstrBundleIterator operator++(int) {
269
129M
    MachineInstrBundleIterator Temp = *this;
270
129M
    ++*this;
271
129M
    return Temp;
272
129M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++(int)
Line
Count
Source
268
75.0M
  MachineInstrBundleIterator operator++(int) {
269
75.0M
    MachineInstrBundleIterator Temp = *this;
270
75.0M
    ++*this;
271
75.0M
    return Temp;
272
75.0M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++(int)
Line
Count
Source
268
836k
  MachineInstrBundleIterator operator++(int) {
269
836k
    MachineInstrBundleIterator Temp = *this;
270
836k
    ++*this;
271
836k
    return Temp;
272
836k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++(int)
Line
Count
Source
268
53.8M
  MachineInstrBundleIterator operator++(int) {
269
53.8M
    MachineInstrBundleIterator Temp = *this;
270
53.8M
    ++*this;
271
53.8M
    return Temp;
272
53.8M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++(int)
Line
Count
Source
268
216
  MachineInstrBundleIterator operator++(int) {
269
216
    MachineInstrBundleIterator Temp = *this;
270
216
    ++*this;
271
216
    return Temp;
272
216
  }
273
274
225M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getInstrIterator() const
Line
Count
Source
274
225M
  instr_iterator getInstrIterator() const { return MII; }
Unexecuted instantiation: llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getInstrIterator() const
275
276
20.4M
  nonconst_iterator getNonConstIterator() const { return MII.getNonConst(); }
277
278
  /// Get a reverse iterator to the same node.
279
  ///
280
  /// Gives a reverse iterator that will dereference (and have a handle) to the
281
  /// same node.  Converting the endpoint iterators in a range will give a
282
  /// different range; for range operations, use the explicit conversions.
283
181k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getReverse() const
Line
Count
Source
283
121k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getReverse() const
Line
Count
Source
283
16.6k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getReverse() const
Line
Count
Source
283
43.3k
  reverse_iterator getReverse() const { return MII.getReverse(); }
284
};
285
286
} // end namespace llvm
287
288
#endif // LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H