Coverage Report

Created: 2018-11-16 02:38

/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
477M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
477M
    if (!I.isEnd())
56
465M
      
while (465M
I->isBundledWithPred())
57
299k
        --I;
58
477M
    return I;
59
477M
  }
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
422M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
422M
    if (!I.isEnd())
56
412M
      
while (412M
I->isBundledWithPred())
57
284k
        --I;
58
422M
    return I;
59
422M
  }
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
54.9M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
55
54.9M
    if (!I.isEnd())
56
52.6M
      
while (52.6M
I->isBundledWithPred())
57
14.3k
        --I;
58
54.9M
    return I;
59
54.9M
  }
60
61
  /// Get the final node of the current bundle.
62
1.09G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
1.09G
    if (!I.isEnd())
64
1.09G
      
while (1.09G
I->isBundledWithSucc())
65
189k
        ++I;
66
1.09G
    return I;
67
1.09G
  }
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
915M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
915M
    if (!I.isEnd())
64
915M
      
while (915M
I->isBundledWithSucc())
65
135k
        ++I;
66
915M
    return I;
67
915M
  }
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
182M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
63
182M
    if (!I.isEnd())
64
182M
      
while (182M
I->isBundledWithSucc())
65
54.3k
        ++I;
66
182M
    return I;
67
182M
  }
68
69
  /// Increment forward ilist iterator.
70
1.09G
  template <class Iterator> static void increment(Iterator &I) {
71
1.09G
    I = std::next(getBundleFinal(I));
72
1.09G
  }
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
915M
  template <class Iterator> static void increment(Iterator &I) {
71
915M
    I = std::next(getBundleFinal(I));
72
915M
  }
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
182M
  template <class Iterator> static void increment(Iterator &I) {
71
182M
    I = std::next(getBundleFinal(I));
72
182M
  }
73
74
  /// Decrement forward ilist iterator.
75
353M
  template <class Iterator> static void decrement(Iterator &I) {
76
353M
    I = getBundleBegin(std::prev(I));
77
353M
  }
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
315M
  template <class Iterator> static void decrement(Iterator &I) {
76
315M
    I = getBundleBegin(std::prev(I));
77
315M
  }
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
124M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
124M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
124M
               I.getReverse())
85
124M
        .getReverse();
86
124M
  }
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
106M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
83
106M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
84
106M
               I.getReverse())
85
106M
        .getReverse();
86
106M
  }
87
88
  /// Get the final node of the current bundle.
89
358
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
90
358
    return MachineInstrBundleIteratorHelper<false>::getBundleFinal(
91
358
               I.getReverse())
92
358
        .getReverse();
93
358
  }
94
95
  /// Increment reverse ilist iterator.
96
111M
  template <class Iterator> static void increment(Iterator &I) {
97
111M
    I = getBundleBegin(std::next(I));
98
111M
  }
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
96.0M
  template <class Iterator> static void increment(Iterator &I) {
97
96.0M
    I = getBundleBegin(std::next(I));
98
96.0M
  }
99
100
  /// Decrement reverse ilist iterator.
101
358
  template <class Iterator> static void decrement(Iterator &I) {
102
358
    I = std::prev(getBundleFinal(I));
103
358
  }
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.29G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.29G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.29G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.29G
           "bundled MI");
137
1.29G
  }
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.17G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
1.17G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
1.17G
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
1.17G
           "bundled MI");
137
1.17G
  }
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
89.7M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
89.7M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
89.7M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
89.7M
           "bundled MI");
137
89.7M
  }
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
24.5M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
134
24.5M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
135
24.5M
           "It's not legal to initialize MachineInstrBundleIterator with a "
136
24.5M
           "bundled MI");
137
24.5M
  }
138
139
19.6M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
19.6M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
19.6M
                                      "MachineInstrBundleIterator with a "
142
19.6M
                                      "bundled MI");
143
19.6M
  }
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.05M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
2.05M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
2.05M
                                      "MachineInstrBundleIterator with a "
142
2.05M
                                      "bundled MI");
143
2.05M
  }
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
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
139
195
  MachineInstrBundleIterator(reference MI) : MII(MI) {
140
195
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
141
195
                                      "MachineInstrBundleIterator with a "
142
195
                                      "bundled MI");
143
195
  }
144
145
92.1M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
92.1M
    // FIXME: This conversion should be explicit.
147
92.1M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
92.1M
                                                "MachineInstrBundleIterator "
149
92.1M
                                                "with a bundled MI");
150
92.1M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
89.7M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
89.7M
    // FIXME: This conversion should be explicit.
147
89.7M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
89.7M
                                                "MachineInstrBundleIterator "
149
89.7M
                                                "with a bundled MI");
150
89.7M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
2.46M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
2.46M
    // FIXME: This conversion should be explicit.
147
2.46M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
2.46M
                                                "MachineInstrBundleIterator "
149
2.46M
                                                "with a bundled MI");
150
2.46M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
145
7.58k
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
7.58k
    // FIXME: This conversion should be explicit.
147
7.58k
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
7.58k
                                                "MachineInstrBundleIterator "
149
7.58k
                                                "with a bundled MI");
150
7.58k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
145
286
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
146
286
    // FIXME: This conversion should be explicit.
147
286
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
148
286
                                                "MachineInstrBundleIterator "
149
286
                                                "with a bundled MI");
150
286
  }
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.2M
      : MII(I.getInstrIterator()) {}
159
160
26.0M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator()
Line
Count
Source
160
24.6M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator()
Line
Count
Source
160
1.38M
  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
376
      : MachineInstrBundleIterator(++I.getReverse()) {}
173
174
  /// Get the bundle iterator for the given instruction's bundle.
175
12.7M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
12.7M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
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
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
10.5M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
176
10.5M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
177
10.5M
  }
178
179
2.37G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator*() const
Line
Count
Source
179
1.98G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator*() const
Line
Count
Source
179
269M
  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
101M
  reference operator*() const { return *MII; }
180
679M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator->() const
Line
Count
Source
180
643M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator->() const
Line
Count
Source
180
31.0M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator->() const
Line
Count
Source
180
4.61M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator->() const
Line
Count
Source
180
236k
  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.93G
                         const MachineInstrBundleIterator &R) {
187
1.93G
    return L.MII == R.MII;
188
1.93G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
186
1.55G
                         const MachineInstrBundleIterator &R) {
187
1.55G
    return L.MII == R.MII;
188
1.55G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
186
254M
                         const MachineInstrBundleIterator &R) {
187
254M
    return L.MII == R.MII;
188
254M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
186
105M
                         const MachineInstrBundleIterator &R) {
187
105M
    return L.MII == R.MII;
188
105M
  }
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.6k
                         const const_instr_iterator &R) {
191
10.6k
    return L.MII == R; // Avoid assertion about validity of R.
192
10.6k
  }
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.6k
                         const const_instr_iterator &R) {
191
10.6k
    return L.MII == R; // Avoid assertion about validity of R.
192
10.6k
  }
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
14
                         const const_instr_iterator &R) {
191
14
    return L.MII == R; // Avoid assertion about validity of R.
192
14
  }
193
  friend bool operator==(const const_instr_iterator &L,
194
1.97M
                         const MachineInstrBundleIterator &R) {
195
1.97M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.97M
  }
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.72M
                         const MachineInstrBundleIterator &R) {
195
1.72M
    return L == R.MII; // Avoid assertion about validity of L.
196
1.72M
  }
197
  friend bool operator==(const MachineInstrBundleIterator &L,
198
148k
                         const nonconst_instr_iterator &R) {
199
148k
    return L.MII == R; // Avoid assertion about validity of R.
200
148k
  }
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.6k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
206
10.6k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
207
10.6k
  }
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.64G
                         const MachineInstrBundleIterator &R) {
222
1.64G
    return !(L == R);
223
1.64G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
221
1.28G
                         const MachineInstrBundleIterator &R) {
222
1.28G
    return !(L == R);
223
1.28G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
221
105M
                         const MachineInstrBundleIterator &R) {
222
105M
    return !(L == R);
223
105M
  }
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
234M
                         const MachineInstrBundleIterator &R) {
222
234M
    return !(L == R);
223
234M
  }
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.72M
                         const MachineInstrBundleIterator &R) {
230
1.72M
    return !(L == R);
231
1.72M
  }
232
  friend bool operator!=(const MachineInstrBundleIterator &L,
233
34.3k
                         const nonconst_instr_iterator &R) {
234
34.3k
    return !(L == R);
235
34.3k
  }
236
  friend bool operator!=(const nonconst_instr_iterator &L,
237
4.48k
                         const MachineInstrBundleIterator &R) {
238
4.48k
    return !(L == R);
239
4.48k
  }
240
7.74k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
241
7.74k
    return !(L == R);
242
7.74k
  }
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
353M
  MachineInstrBundleIterator &operator--() {
257
353M
    this->decrement(MII);
258
353M
    return *this;
259
353M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--()
Line
Count
Source
256
315M
  MachineInstrBundleIterator &operator--() {
257
315M
    this->decrement(MII);
258
315M
    return *this;
259
315M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator--()
Line
Count
Source
256
358
  MachineInstrBundleIterator &operator--() {
257
358
    this->decrement(MII);
258
358
    return *this;
259
358
  }
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.20G
  MachineInstrBundleIterator &operator++() {
261
1.20G
    this->increment(MII);
262
1.20G
    return *this;
263
1.20G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++()
Line
Count
Source
260
915M
  MachineInstrBundleIterator &operator++() {
261
915M
    this->increment(MII);
262
915M
    return *this;
263
915M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++()
Line
Count
Source
260
182M
  MachineInstrBundleIterator &operator++() {
261
182M
    this->increment(MII);
262
182M
    return *this;
263
182M
  }
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
96.0M
  MachineInstrBundleIterator &operator++() {
261
96.0M
    this->increment(MII);
262
96.0M
    return *this;
263
96.0M
  }
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.6M
  MachineInstrBundleIterator operator++(int) {
270
73.6M
    MachineInstrBundleIterator Temp = *this;
271
73.6M
    ++*this;
272
73.6M
    return Temp;
273
73.6M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++(int)
Line
Count
Source
269
807k
  MachineInstrBundleIterator operator++(int) {
270
807k
    MachineInstrBundleIterator Temp = *this;
271
807k
    ++*this;
272
807k
    return Temp;
273
807k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++(int)
Line
Count
Source
269
53.1M
  MachineInstrBundleIterator operator++(int) {
270
53.1M
    MachineInstrBundleIterator Temp = *this;
271
53.1M
    ++*this;
272
53.1M
    return Temp;
273
53.1M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++(int)
Line
Count
Source
269
195
  MachineInstrBundleIterator operator++(int) {
270
195
    MachineInstrBundleIterator Temp = *this;
271
195
    ++*this;
272
195
    return Temp;
273
195
  }
274
275
216M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getInstrIterator() const
Line
Count
Source
275
216M
  instr_iterator getInstrIterator() const { return MII; }
Unexecuted instantiation: llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getInstrIterator() const
276
277
20.0M
  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
188k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getReverse() const
Line
Count
Source
284
126k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getReverse() const
Line
Count
Source
284
16.4k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getReverse() const
Line
Count
Source
284
45.1k
  reverse_iterator getReverse() const { return MII.getReverse(); }
285
};
286
287
} // end namespace llvm
288
289
#endif // LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H