Coverage Report

Created: 2018-09-17 19:50

/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
441M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
441M
    if (!I.isEnd())
56
432M
      
while (432M
I->isBundledWithPred())
57
293k
        --I;
58
441M
    return I;
59
441M
  }
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
386M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
386M
    if (!I.isEnd())
56
379M
      
while (379M
I->isBundledWithPred())
57
280k
        --I;
58
386M
    return I;
59
386M
  }
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
55.0M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
55.0M
    if (!I.isEnd())
56
52.7M
      
while (52.7M
I->isBundledWithPred())
57
13.8k
        --I;
58
55.0M
    return I;
59
55.0M
  }
60
61
  /// Get the final node of the current bundle.
62
1.06G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
1.06G
    if (!I.isEnd())
64
1.06G
      
while (1.06G
I->isBundledWithSucc())
65
195k
        ++I;
66
1.06G
    return I;
67
1.06G
  }
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
880M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
880M
    if (!I.isEnd())
64
880M
      
while (880M
I->isBundledWithSucc())
65
133k
        ++I;
66
880M
    return I;
67
880M
  }
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
180M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
180M
    if (!I.isEnd())
64
180M
      
while (180M
I->isBundledWithSucc())
65
62.0k
        ++I;
66
180M
    return I;
67
180M
  }
68
69
  /// Increment forward ilist iterator.
70
1.06G
  template <class Iterator> static void increment(Iterator &I) {
71
1.06G
    I = std::next(getBundleFinal(I));
72
1.06G
  }
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
880M
  template <class Iterator> static void increment(Iterator &I) {
71
880M
    I = std::next(getBundleFinal(I));
72
880M
  }
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
180M
  template <class Iterator> static void increment(Iterator &I) {
71
180M
    I = std::next(getBundleFinal(I));
72
180M
  }
73
74
  /// Decrement forward ilist iterator.
75
351M
  template <class Iterator> static void decrement(Iterator &I) {
76
351M
    I = getBundleBegin(std::prev(I));
77
351M
  }
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
314M
  template <class Iterator> static void decrement(Iterator &I) {
76
314M
    I = getBundleBegin(std::prev(I));
77
314M
  }
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
37.2M
  template <class Iterator> static void decrement(Iterator &I) {
76
37.2M
    I = getBundleBegin(std::prev(I));
77
37.2M
  }
78
};
79
80
template <> struct MachineInstrBundleIteratorHelper<true> {
81
  /// Get the beginning of the current bundle.
82
89.7M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
89.7M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
89.7M
               I.getReverse())
85
89.7M
        .getReverse();
86
89.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.7M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
17.7M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
17.7M
               I.getReverse())
85
17.7M
        .getReverse();
86
17.7M
  }
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
71.9M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
71.9M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
71.9M
               I.getReverse())
85
71.9M
        .getReverse();
86
71.9M
  }
87
88
  /// Get the final node of the current bundle.
89
357
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
90
357
    return MachineInstrBundleIteratorHelper<false>::getBundleFinal(
91
357
               I.getReverse())
92
357
        .getReverse();
93
357
  }
94
95
  /// Increment reverse ilist iterator.
96
79.8M
  template <class Iterator> static void increment(Iterator &I) {
97
79.8M
    I = getBundleBegin(std::next(I));
98
79.8M
  }
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.4M
  template <class Iterator> static void increment(Iterator &I) {
97
15.4M
    I = getBundleBegin(std::next(I));
98
15.4M
  }
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
64.3M
  template <class Iterator> static void increment(Iterator &I) {
97
64.3M
    I = getBundleBegin(std::next(I));
98
64.3M
  }
99
100
  /// Decrement reverse ilist iterator.
101
357
  template <class Iterator> static void decrement(Iterator &I) {
102
357
    I = std::prev(getBundleFinal(I));
103
357
  }
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.19G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.19G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.19G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.19G
           "bundled MI");
137
1.19G
  }
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.08G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.08G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.08G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.08G
           "bundled MI");
137
1.08G
  }
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
88.9M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
88.9M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
88.9M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
88.9M
           "bundled MI");
137
88.9M
  }
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.58M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
4.58M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
4.58M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
4.58M
           "bundled MI");
137
4.58M
  }
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.6M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
18.6M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
18.6M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
18.6M
           "bundled MI");
137
18.6M
  }
138
139
20.1M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
20.1M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
20.1M
                                      "MachineInstrBundleIterator with a "
142
20.1M
                                      "bundled MI");
143
20.1M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
139
17.5M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
17.5M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
17.5M
                                      "MachineInstrBundleIterator with a "
142
17.5M
                                      "bundled MI");
143
17.5M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
139
2.57M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
2.57M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
2.57M
                                      "MachineInstrBundleIterator with a "
142
2.57M
                                      "bundled MI");
143
2.57M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
139
14.5k
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
14.5k
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
14.5k
                                      "MachineInstrBundleIterator with a "
142
14.5k
                                      "bundled MI");
143
14.5k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
139
185
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
185
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
185
                                      "MachineInstrBundleIterator with a "
142
185
                                      "bundled MI");
143
185
  }
144
145
92.5M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
92.5M
    // FIXME: This conversion should be explicit.
147
92.5M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
92.5M
                                                "MachineInstrBundleIterator "
149
92.5M
                                                "with a bundled MI");
150
92.5M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
90.0M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
90.0M
    // FIXME: This conversion should be explicit.
147
90.0M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
90.0M
                                                "MachineInstrBundleIterator "
149
90.0M
                                                "with a bundled MI");
150
90.0M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
2.45M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
2.45M
    // FIXME: This conversion should be explicit.
147
2.45M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
2.45M
                                                "MachineInstrBundleIterator "
149
2.45M
                                                "with a bundled MI");
150
2.45M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
6.80k
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
6.80k
    // FIXME: This conversion should be explicit.
147
6.80k
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
6.80k
                                                "MachineInstrBundleIterator "
149
6.80k
                                                "with a bundled MI");
150
6.80k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
282
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
282
    // FIXME: This conversion should be explicit.
147
282
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
282
                                                "MachineInstrBundleIterator "
149
282
                                                "with a bundled MI");
150
282
  }
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
60.9M
      : MII(I.getInstrIterator()) {}
159
160
25.4M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator()
Line
Count
Source
160
24.1M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator()
Line
Count
Source
160
1.35M
  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
438
      : MachineInstrBundleIterator(++I.getReverse()) {}
173
174
  /// Get the bundle iterator for the given instruction's bundle.
175
9.89M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
9.89M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
9.89M
  }
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.24M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
2.24M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
2.24M
  }
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.64M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
7.64M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
7.64M
  }
178
179
2.17G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator*() const
Line
Count
Source
179
1.82G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator*() const
Line
Count
Source
179
267M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator*() const
Line
Count
Source
179
15.7M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator*() const
Line
Count
Source
179
69.3M
  reference operator*() const { return *MII; }
180
598M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator->() const
Line
Count
Source
180
562M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator->() const
Line
Count
Source
180
30.8M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator->() const
Line
Count
Source
180
4.58M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator->() const
Line
Count
Source
180
235k
  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.81G
                         const MachineInstrBundleIterator &R) {
187
1.81G
    return L.MII == R.MII;
188
1.81G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
186
1.47G
                         const MachineInstrBundleIterator &R) {
187
1.47G
    return L.MII == R.MII;
188
1.47G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
186
253M
                         const MachineInstrBundleIterator &R) {
187
253M
    return L.MII == R.MII;
188
253M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
186
71.0M
                         const MachineInstrBundleIterator &R) {
187
71.0M
    return L.MII == R.MII;
188
71.0M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
186
17.7M
                         const MachineInstrBundleIterator &R) {
187
17.7M
    return L.MII == R.MII;
188
17.7M
  }
189
  friend bool operator==(const MachineInstrBundleIterator &L,
190
10.8k
                         const const_instr_iterator &R) {
191
10.8k
    return L.MII == R; // Avoid assertion about validity of R.
192
10.8k
  }
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.8k
                         const const_instr_iterator &R) {
191
10.8k
    return L.MII == R; // Avoid assertion about validity of R.
192
10.8k
  }
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.96M
                         const MachineInstrBundleIterator &R) {
195
1.96M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.96M
  }
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
249k
                         const MachineInstrBundleIterator &R) {
195
249k
    return L == R.MII; // Avoid assertion about validity of L.
196
249k
  }
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.71M
                         const MachineInstrBundleIterator &R) {
195
1.71M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.71M
  }
197
  friend bool operator==(const MachineInstrBundleIterator &L,
198
142k
                         const nonconst_instr_iterator &R) {
199
142k
    return L.MII == R; // Avoid assertion about validity of R.
200
142k
  }
201
  friend bool operator==(const nonconst_instr_iterator &L,
202
21.0k
                         const MachineInstrBundleIterator &R) {
203
21.0k
    return L == R.MII; // Avoid assertion about validity of L.
204
21.0k
  }
205
10.8k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
206
10.8k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
207
10.8k
  }
208
249k
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
209
249k
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
210
249k
  }
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
249k
                         const MachineInstrBundleIterator &R) {
217
249k
    return &L == R; // Avoid assertion about validity of L.
218
249k
  }
219
220
  friend bool operator!=(const MachineInstrBundleIterator &L,
221
1.51G
                         const MachineInstrBundleIterator &R) {
222
1.51G
    return !(L == R);
223
1.51G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
221
1.19G
                         const MachineInstrBundleIterator &R) {
222
1.19G
    return !(L == R);
223
1.19G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
221
70.8M
                         const MachineInstrBundleIterator &R) {
222
70.8M
    return !(L == R);
223
70.8M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
221
17.7M
                         const MachineInstrBundleIterator &R) {
222
17.7M
    return !(L == R);
223
17.7M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
221
232M
                         const MachineInstrBundleIterator &R) {
222
232M
    return !(L == R);
223
232M
  }
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.71M
                         const MachineInstrBundleIterator &R) {
230
1.71M
    return !(L == R);
231
1.71M
  }
232
  friend bool operator!=(const MachineInstrBundleIterator &L,
233
34.4k
                         const nonconst_instr_iterator &R) {
234
34.4k
    return !(L == R);
235
34.4k
  }
236
  friend bool operator!=(const nonconst_instr_iterator &L,
237
4.17k
                         const MachineInstrBundleIterator &R) {
238
4.17k
    return !(L == R);
239
4.17k
  }
240
7.51k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
241
7.51k
    return !(L == R);
242
7.51k
  }
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
351M
  MachineInstrBundleIterator &operator--() {
257
351M
    this->decrement(MII);
258
351M
    return *this;
259
351M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--()
Line
Count
Source
256
314M
  MachineInstrBundleIterator &operator--() {
257
314M
    this->decrement(MII);
258
314M
    return *this;
259
314M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator--()
Line
Count
Source
256
357
  MachineInstrBundleIterator &operator--() {
257
357
    this->decrement(MII);
258
357
    return *this;
259
357
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--()
Line
Count
Source
256
37.2M
  MachineInstrBundleIterator &operator--() {
257
37.2M
    this->decrement(MII);
258
37.2M
    return *this;
259
37.2M
  }
260
1.14G
  MachineInstrBundleIterator &operator++() {
261
1.14G
    this->increment(MII);
262
1.14G
    return *this;
263
1.14G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++()
Line
Count
Source
260
880M
  MachineInstrBundleIterator &operator++() {
261
880M
    this->increment(MII);
262
880M
    return *this;
263
880M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++()
Line
Count
Source
260
180M
  MachineInstrBundleIterator &operator++() {
261
180M
    this->increment(MII);
262
180M
    return *this;
263
180M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++()
Line
Count
Source
260
15.4M
  MachineInstrBundleIterator &operator++() {
261
15.4M
    this->increment(MII);
262
15.4M
    return *this;
263
15.4M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++()
Line
Count
Source
260
64.3M
  MachineInstrBundleIterator &operator++() {
261
64.3M
    this->increment(MII);
262
64.3M
    return *this;
263
64.3M
  }
264
46.9k
  MachineInstrBundleIterator operator--(int) {
265
46.9k
    MachineInstrBundleIterator Temp = *this;
266
46.9k
    --*this;
267
46.9k
    return Temp;
268
46.9k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--(int)
Line
Count
Source
264
46.7k
  MachineInstrBundleIterator operator--(int) {
265
46.7k
    MachineInstrBundleIterator Temp = *this;
266
46.7k
    --*this;
267
46.7k
    return Temp;
268
46.7k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--(int)
Line
Count
Source
264
212
  MachineInstrBundleIterator operator--(int) {
265
212
    MachineInstrBundleIterator Temp = *this;
266
212
    --*this;
267
212
    return Temp;
268
212
  }
269
127M
  MachineInstrBundleIterator operator++(int) {
270
127M
    MachineInstrBundleIterator Temp = *this;
271
127M
    ++*this;
272
127M
    return Temp;
273
127M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++(int)
Line
Count
Source
269
73.3M
  MachineInstrBundleIterator operator++(int) {
270
73.3M
    MachineInstrBundleIterator Temp = *this;
271
73.3M
    ++*this;
272
73.3M
    return Temp;
273
73.3M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++(int)
Line
Count
Source
269
784k
  MachineInstrBundleIterator operator++(int) {
270
784k
    MachineInstrBundleIterator Temp = *this;
271
784k
    ++*this;
272
784k
    return Temp;
273
784k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++(int)
Line
Count
Source
269
52.8M
  MachineInstrBundleIterator operator++(int) {
270
52.8M
    MachineInstrBundleIterator Temp = *this;
271
52.8M
    ++*this;
272
52.8M
    return Temp;
273
52.8M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++(int)
Line
Count
Source
269
185
  MachineInstrBundleIterator operator++(int) {
270
185
    MachineInstrBundleIterator Temp = *this;
271
185
    ++*this;
272
185
    return Temp;
273
185
  }
274
275
217M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getInstrIterator() const
Line
Count
Source
275
217M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getInstrIterator() const
Line
Count
Source
275
4.12k
  instr_iterator getInstrIterator() const { return MII; }
276
277
20.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
181k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getReverse() const
Line
Count
Source
284
120k
  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
44.8k
  reverse_iterator getReverse() const { return MII.getReverse(); }
285
};
286
287
} // end namespace llvm
288
289
#endif // LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H