Coverage Report

Created: 2018-07-19 03:59

/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
//                     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
0
template <> struct MachineInstrBundleIteratorHelper<false> {
53
  /// Get the beginning of the current bundle.
54
431M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
431M
    if (!I.isEnd())
56
422M
      
while (422M
I->isBundledWithPred())
57
292k
        --I;
58
431M
    return I;
59
431M
  }
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
378M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
378M
    if (!I.isEnd())
56
371M
      
while (371M
I->isBundledWithPred())
57
278k
        --I;
58
378M
    return I;
59
378M
  }
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
53.5M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
53.5M
    if (!I.isEnd())
56
51.3M
      
while (51.3M
I->isBundledWithPred())
57
13.6k
        --I;
58
53.5M
    return I;
59
53.5M
  }
60
61
  /// Get the final node of the current bundle.
62
1.03G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
1.03G
    if (!I.isEnd())
64
1.03G
      
while (1.03G
I->isBundledWithSucc())
65
188k
        ++I;
66
1.03G
    return I;
67
1.03G
  }
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
860M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
860M
    if (!I.isEnd())
64
860M
      
while (860M
I->isBundledWithSucc())
65
130k
        ++I;
66
860M
    return I;
67
860M
  }
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
175M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
175M
    if (!I.isEnd())
64
175M
      
while (175M
I->isBundledWithSucc())
65
57.4k
        ++I;
66
175M
    return I;
67
175M
  }
68
69
  /// Increment forward ilist iterator.
70
1.03G
  template <class Iterator> static void increment(Iterator &I) {
71
1.03G
    I = std::next(getBundleFinal(I));
72
1.03G
  }
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
860M
  template <class Iterator> static void increment(Iterator &I) {
71
860M
    I = std::next(getBundleFinal(I));
72
860M
  }
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
175M
  template <class Iterator> static void increment(Iterator &I) {
71
175M
    I = std::next(getBundleFinal(I));
72
175M
  }
73
74
  /// Decrement forward ilist iterator.
75
343M
  template <class Iterator> static void decrement(Iterator &I) {
76
343M
    I = getBundleBegin(std::prev(I));
77
343M
  }
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
307M
  template <class Iterator> static void decrement(Iterator &I) {
76
307M
    I = getBundleBegin(std::prev(I));
77
307M
  }
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
36.1M
  template <class Iterator> static void decrement(Iterator &I) {
76
36.1M
    I = getBundleBegin(std::prev(I));
77
36.1M
  }
78
};
79
80
template <> struct MachineInstrBundleIteratorHelper<true> {
81
  /// Get the beginning of the current bundle.
82
87.7M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
87.7M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
87.7M
               I.getReverse())
85
87.7M
        .getReverse();
86
87.7M
  }
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
17.3M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
17.3M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
17.3M
               I.getReverse())
85
17.3M
        .getReverse();
86
17.3M
  }
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
70.4M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
70.4M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
70.4M
               I.getReverse())
85
70.4M
        .getReverse();
86
70.4M
  }
87
88
  /// Get the final node of the current bundle.
89
363
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
90
363
    return MachineInstrBundleIteratorHelper<false>::getBundleFinal(
91
363
               I.getReverse())
92
363
        .getReverse();
93
363
  }
94
95
  /// Increment reverse ilist iterator.
96
78.0M
  template <class Iterator> static void increment(Iterator &I) {
97
78.0M
    I = getBundleBegin(std::next(I));
98
78.0M
  }
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
15.1M
  template <class Iterator> static void increment(Iterator &I) {
97
15.1M
    I = getBundleBegin(std::next(I));
98
15.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
96
62.9M
  template <class Iterator> static void increment(Iterator &I) {
97
62.9M
    I = getBundleBegin(std::next(I));
98
62.9M
  }
99
100
  /// Decrement reverse ilist iterator.
101
363
  template <class Iterator> static void decrement(Iterator &I) {
102
363
    I = std::prev(getBundleFinal(I));
103
363
  }
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
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&)
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.16G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.16G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.16G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.16G
           "bundled MI");
137
1.16G
  }
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.05G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.05G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.05G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.05G
           "bundled MI");
137
1.05G
  }
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
86.3M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
86.3M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
86.3M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
86.3M
           "bundled MI");
137
86.3M
  }
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
4.46M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
4.46M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
4.46M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
4.46M
           "bundled MI");
137
4.46M
  }
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
18.2M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
18.2M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
18.2M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
18.2M
           "bundled MI");
137
18.2M
  }
138
139
19.2M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
19.2M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
19.2M
                                      "MachineInstrBundleIterator with a "
142
19.2M
                                      "bundled MI");
143
19.2M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
139
16.6M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
16.6M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
16.6M
                                      "MachineInstrBundleIterator with a "
142
16.6M
                                      "bundled MI");
143
16.6M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
139
2.55M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
2.55M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
2.55M
                                      "MachineInstrBundleIterator with a "
142
2.55M
                                      "bundled MI");
143
2.55M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
139
14.8k
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
14.8k
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
14.8k
                                      "MachineInstrBundleIterator with a "
142
14.8k
                                      "bundled MI");
143
14.8k
  }
144
145
90.6M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
90.6M
    // FIXME: This conversion should be explicit.
147
90.6M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
90.6M
                                                "MachineInstrBundleIterator "
149
90.6M
                                                "with a bundled MI");
150
90.6M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
88.1M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
88.1M
    // FIXME: This conversion should be explicit.
147
88.1M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
88.1M
                                                "MachineInstrBundleIterator "
149
88.1M
                                                "with a bundled MI");
150
88.1M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
2.43M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
2.43M
    // FIXME: This conversion should be explicit.
147
2.43M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
2.43M
                                                "MachineInstrBundleIterator "
149
2.43M
                                                "with a bundled MI");
150
2.43M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
6.68k
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
6.68k
    // FIXME: This conversion should be explicit.
147
6.68k
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
6.68k
                                                "MachineInstrBundleIterator "
149
6.68k
                                                "with a bundled MI");
150
6.68k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
279
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
279
    // FIXME: This conversion should be explicit.
147
279
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
279
                                                "MachineInstrBundleIterator "
149
279
                                                "with a bundled MI");
150
279
  }
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
59.4M
      : MII(I.getInstrIterator()) {}
159
160
24.7M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator()
Line
Count
Source
160
23.3M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator()
Line
Count
Source
160
1.32M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator()
Line
Count
Source
160
13.5k
  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
266
      : MachineInstrBundleIterator(++I.getReverse()) {}
173
174
  /// Get the bundle iterator for the given instruction's bundle.
175
9.66M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
9.66M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
9.66M
  }
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
2.18M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
2.18M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
2.18M
  }
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
7.47M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
7.47M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
7.47M
  }
178
179
2.12G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator*() const
Line
Count
Source
179
1.78G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator*() const
Line
Count
Source
179
259M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator*() const
Line
Count
Source
179
15.3M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator*() const
Line
Count
Source
179
67.9M
  reference operator*() const { return *MII; }
180
585M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator->() const
Line
Count
Source
180
550M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator->() const
Line
Count
Source
180
29.9M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator->() const
Line
Count
Source
180
4.69M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator->() const
Line
Count
Source
180
237k
  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
1.76G
                         const MachineInstrBundleIterator &R) {
187
1.76G
    return L.MII == R.MII;
188
1.76G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
186
1.43G
                         const MachineInstrBundleIterator &R) {
187
1.43G
    return L.MII == R.MII;
188
1.43G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
186
245M
                         const MachineInstrBundleIterator &R) {
187
245M
    return L.MII == R.MII;
188
245M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
186
69.4M
                         const MachineInstrBundleIterator &R) {
187
69.4M
    return L.MII == R.MII;
188
69.4M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
186
17.3M
                         const MachineInstrBundleIterator &R) {
187
17.3M
    return L.MII == R.MII;
188
17.3M
  }
189
  friend bool operator==(const MachineInstrBundleIterator &L,
190
10.0k
                         const const_instr_iterator &R) {
191
10.0k
    return L.MII == R; // Avoid assertion about validity of R.
192
10.0k
  }
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
190
10.0k
                         const const_instr_iterator &R) {
191
10.0k
    return L.MII == R; // Avoid assertion about validity of R.
192
10.0k
  }
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
190
19
                         const const_instr_iterator &R) {
191
19
    return L.MII == R; // Avoid assertion about validity of R.
192
19
  }
193
  friend bool operator==(const const_instr_iterator &L,
194
1.91M
                         const MachineInstrBundleIterator &R) {
195
1.91M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.91M
  }
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
242k
                         const MachineInstrBundleIterator &R) {
195
242k
    return L == R.MII; // Avoid assertion about validity of L.
196
242k
  }
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.66M
                         const MachineInstrBundleIterator &R) {
195
1.66M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.66M
  }
197
  friend bool operator==(const MachineInstrBundleIterator &L,
198
138k
                         const nonconst_instr_iterator &R) {
199
138k
    return L.MII == R; // Avoid assertion about validity of R.
200
138k
  }
201
  friend bool operator==(const nonconst_instr_iterator &L,
202
20.8k
                         const MachineInstrBundleIterator &R) {
203
20.8k
    return L == R.MII; // Avoid assertion about validity of L.
204
20.8k
  }
205
10.0k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
206
10.0k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
207
10.0k
  }
208
242k
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
209
242k
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
210
242k
  }
211
  friend bool operator==(const MachineInstrBundleIterator &L,
212
100
                         const_reference R) {
213
100
    return L == &R; // Avoid assertion about validity of R.
214
100
  }
215
  friend bool operator==(const_reference L,
216
242k
                         const MachineInstrBundleIterator &R) {
217
242k
    return &L == R; // Avoid assertion about validity of L.
218
242k
  }
219
220
  friend bool operator!=(const MachineInstrBundleIterator &L,
221
1.48G
                         const MachineInstrBundleIterator &R) {
222
1.48G
    return !(L == R);
223
1.48G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
221
1.17G
                         const MachineInstrBundleIterator &R) {
222
1.17G
    return !(L == R);
223
1.17G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
221
69.2M
                         const MachineInstrBundleIterator &R) {
222
69.2M
    return !(L == R);
223
69.2M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
221
17.3M
                         const MachineInstrBundleIterator &R) {
222
17.3M
    return !(L == R);
223
17.3M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
221
225M
                         const MachineInstrBundleIterator &R) {
222
225M
    return !(L == R);
223
225M
  }
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.66M
                         const MachineInstrBundleIterator &R) {
230
1.66M
    return !(L == R);
231
1.66M
  }
232
  friend bool operator!=(const MachineInstrBundleIterator &L,
233
33.7k
                         const nonconst_instr_iterator &R) {
234
33.7k
    return !(L == R);
235
33.7k
  }
236
  friend bool operator!=(const nonconst_instr_iterator &L,
237
4.15k
                         const MachineInstrBundleIterator &R) {
238
4.15k
    return !(L == R);
239
4.15k
  }
240
7.49k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
241
7.49k
    return !(L == R);
242
7.49k
  }
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
343M
  MachineInstrBundleIterator &operator--() {
257
343M
    this->decrement(MII);
258
343M
    return *this;
259
343M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--()
Line
Count
Source
256
307M
  MachineInstrBundleIterator &operator--() {
257
307M
    this->decrement(MII);
258
307M
    return *this;
259
307M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator--()
Line
Count
Source
256
363
  MachineInstrBundleIterator &operator--() {
257
363
    this->decrement(MII);
258
363
    return *this;
259
363
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--()
Line
Count
Source
256
36.1M
  MachineInstrBundleIterator &operator--() {
257
36.1M
    this->decrement(MII);
258
36.1M
    return *this;
259
36.1M
  }
260
1.11G
  MachineInstrBundleIterator &operator++() {
261
1.11G
    this->increment(MII);
262
1.11G
    return *this;
263
1.11G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++()
Line
Count
Source
260
860M
  MachineInstrBundleIterator &operator++() {
261
860M
    this->increment(MII);
262
860M
    return *this;
263
860M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++()
Line
Count
Source
260
175M
  MachineInstrBundleIterator &operator++() {
261
175M
    this->increment(MII);
262
175M
    return *this;
263
175M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++()
Line
Count
Source
260
15.1M
  MachineInstrBundleIterator &operator++() {
261
15.1M
    this->increment(MII);
262
15.1M
    return *this;
263
15.1M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++()
Line
Count
Source
260
62.9M
  MachineInstrBundleIterator &operator++() {
261
62.9M
    this->increment(MII);
262
62.9M
    return *this;
263
62.9M
  }
264
46.3k
  MachineInstrBundleIterator operator--(int) {
265
46.3k
    MachineInstrBundleIterator Temp = *this;
266
46.3k
    --*this;
267
46.3k
    return Temp;
268
46.3k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--(int)
Line
Count
Source
264
46.1k
  MachineInstrBundleIterator operator--(int) {
265
46.1k
    MachineInstrBundleIterator Temp = *this;
266
46.1k
    --*this;
267
46.1k
    return Temp;
268
46.1k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--(int)
Line
Count
Source
264
190
  MachineInstrBundleIterator operator--(int) {
265
190
    MachineInstrBundleIterator Temp = *this;
266
190
    --*this;
267
190
    return Temp;
268
190
  }
269
124M
  MachineInstrBundleIterator operator++(int) {
270
124M
    MachineInstrBundleIterator Temp = *this;
271
124M
    ++*this;
272
124M
    return Temp;
273
124M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++(int)
Line
Count
Source
269
71.9M
  MachineInstrBundleIterator operator++(int) {
270
71.9M
    MachineInstrBundleIterator Temp = *this;
271
71.9M
    ++*this;
272
71.9M
    return Temp;
273
71.9M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++(int)
Line
Count
Source
269
739k
  MachineInstrBundleIterator operator++(int) {
270
739k
    MachineInstrBundleIterator Temp = *this;
271
739k
    ++*this;
272
739k
    return Temp;
273
739k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++(int)
Line
Count
Source
269
51.6M
  MachineInstrBundleIterator operator++(int) {
270
51.6M
    MachineInstrBundleIterator Temp = *this;
271
51.6M
    ++*this;
272
51.6M
    return Temp;
273
51.6M
  }
274
275
212M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getInstrIterator() const
Line
Count
Source
275
212M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getInstrIterator() const
Line
Count
Source
275
4.14k
  instr_iterator getInstrIterator() const { return MII; }
276
277
19.6M
  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
180k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getReverse() const
Line
Count
Source
284
119k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getReverse() const
Line
Count
Source
284
16.2k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getReverse() const
Line
Count
Source
284
45.0k
  reverse_iterator getReverse() const { return MII.getReverse(); }
285
};
286
287
} // end namespace llvm
288
289
#endif // LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H