Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h
Line
Count
Source (jump to first uncovered line)
1
//===- llvm/CodeGen/MachineInstrBundleIterator.h ----------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// Defines an iterator class that bundles MachineInstr.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
14
#define LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H
15
16
#include "llvm/ADT/ilist.h"
17
#include "llvm/ADT/simple_ilist.h"
18
#include <cassert>
19
#include <iterator>
20
#include <type_traits>
21
22
namespace llvm {
23
24
template <class T, bool IsReverse> struct MachineInstrBundleIteratorTraits;
25
template <class T> struct MachineInstrBundleIteratorTraits<T, false> {
26
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
27
  using instr_iterator = typename list_type::iterator;
28
  using nonconst_instr_iterator = typename list_type::iterator;
29
  using const_instr_iterator = typename list_type::const_iterator;
30
};
31
template <class T> struct MachineInstrBundleIteratorTraits<T, true> {
32
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
33
  using instr_iterator = typename list_type::reverse_iterator;
34
  using nonconst_instr_iterator = typename list_type::reverse_iterator;
35
  using const_instr_iterator = typename list_type::const_reverse_iterator;
36
};
37
template <class T> struct MachineInstrBundleIteratorTraits<const T, false> {
38
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
39
  using instr_iterator = typename list_type::const_iterator;
40
  using nonconst_instr_iterator = typename list_type::iterator;
41
  using const_instr_iterator = typename list_type::const_iterator;
42
};
43
template <class T> struct MachineInstrBundleIteratorTraits<const T, true> {
44
  using list_type = simple_ilist<T, ilist_sentinel_tracking<true>>;
45
  using instr_iterator = typename list_type::const_reverse_iterator;
46
  using nonconst_instr_iterator = typename list_type::reverse_iterator;
47
  using const_instr_iterator = typename list_type::const_reverse_iterator;
48
};
49
50
template <bool IsReverse> struct MachineInstrBundleIteratorHelper;
51
template <> struct MachineInstrBundleIteratorHelper<false> {
52
  /// Get the beginning of the current bundle.
53
525M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
54
525M
    if (!I.isEnd())
55
513M
      
while (512M
I->isBundledWithPred())
56
327k
        --I;
57
525M
    return I;
58
525M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> llvm::MachineInstrBundleIteratorHelper<false>::getBundleBegin<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>)
Line
Count
Source
53
470M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
54
470M
    if (!I.isEnd())
55
459M
      
while (459M
I->isBundledWithPred())
56
309k
        --I;
57
470M
    return I;
58
470M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> llvm::MachineInstrBundleIteratorHelper<false>::getBundleBegin<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>)
Line
Count
Source
53
55.5M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
54
55.5M
    if (!I.isEnd())
55
53.2M
      
while (53.2M
I->isBundledWithPred())
56
18.5k
        --I;
57
55.5M
    return I;
58
55.5M
  }
59
60
  /// Get the final node of the current bundle.
61
1.25G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
62
1.25G
    if (!I.isEnd())
63
1.25G
      
while (1.25G
I->isBundledWithSucc())
64
357k
        ++I;
65
1.25G
    return I;
66
1.25G
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> llvm::MachineInstrBundleIteratorHelper<false>::getBundleFinal<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>)
Line
Count
Source
61
1.02G
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
62
1.02G
    if (!I.isEnd())
63
1.02G
      
while (1.02G
I->isBundledWithSucc())
64
195k
        ++I;
65
1.02G
    return I;
66
1.02G
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> llvm::MachineInstrBundleIteratorHelper<false>::getBundleFinal<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>)
Line
Count
Source
61
224M
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
62
224M
    if (!I.isEnd())
63
225M
      
while (224M
I->isBundledWithSucc())
64
161k
        ++I;
65
224M
    return I;
66
224M
  }
67
68
  /// Increment forward ilist iterator.
69
1.25G
  template <class Iterator> static void increment(Iterator &I) {
70
1.25G
    I = std::next(getBundleFinal(I));
71
1.25G
  }
void llvm::MachineInstrBundleIteratorHelper<false>::increment<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>&)
Line
Count
Source
69
1.02G
  template <class Iterator> static void increment(Iterator &I) {
70
1.02G
    I = std::next(getBundleFinal(I));
71
1.02G
  }
void llvm::MachineInstrBundleIteratorHelper<false>::increment<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>&)
Line
Count
Source
69
224M
  template <class Iterator> static void increment(Iterator &I) {
70
224M
    I = std::next(getBundleFinal(I));
71
224M
  }
72
73
  /// Decrement forward ilist iterator.
74
392M
  template <class Iterator> static void decrement(Iterator &I) {
75
392M
    I = getBundleBegin(std::prev(I));
76
392M
  }
void llvm::MachineInstrBundleIteratorHelper<false>::decrement<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>&)
Line
Count
Source
74
354M
  template <class Iterator> static void decrement(Iterator &I) {
75
354M
    I = getBundleBegin(std::prev(I));
76
354M
  }
void llvm::MachineInstrBundleIteratorHelper<false>::decrement<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>&)
Line
Count
Source
74
37.8M
  template <class Iterator> static void decrement(Iterator &I) {
75
37.8M
    I = getBundleBegin(std::prev(I));
76
37.8M
  }
77
};
78
79
template <> struct MachineInstrBundleIteratorHelper<true> {
80
  /// Get the beginning of the current bundle.
81
133M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
82
133M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
83
133M
               I.getReverse())
84
133M
        .getReverse();
85
133M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> llvm::MachineInstrBundleIteratorHelper<true>::getBundleBegin<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
81
115M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
82
115M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
83
115M
               I.getReverse())
84
115M
        .getReverse();
85
115M
  }
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true> llvm::MachineInstrBundleIteratorHelper<true>::getBundleBegin<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>)
Line
Count
Source
81
17.6M
  template <class Iterator> static Iterator getBundleBegin(Iterator I) {
82
17.6M
    return MachineInstrBundleIteratorHelper<false>::getBundleBegin(
83
17.6M
               I.getReverse())
84
17.6M
        .getReverse();
85
17.6M
  }
86
87
  /// Get the final node of the current bundle.
88
291
  template <class Iterator> static Iterator getBundleFinal(Iterator I) {
89
291
    return MachineInstrBundleIteratorHelper<false>::getBundleFinal(
90
291
               I.getReverse())
91
291
        .getReverse();
92
291
  }
93
94
  /// Increment reverse ilist iterator.
95
119M
  template <class Iterator> static void increment(Iterator &I) {
96
119M
    I = getBundleBegin(std::next(I));
97
119M
  }
void llvm::MachineInstrBundleIteratorHelper<true>::increment<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>&)
Line
Count
Source
95
104M
  template <class Iterator> static void increment(Iterator &I) {
96
104M
    I = getBundleBegin(std::next(I));
97
104M
  }
void llvm::MachineInstrBundleIteratorHelper<true>::increment<llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true> >(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>&)
Line
Count
Source
95
15.4M
  template <class Iterator> static void increment(Iterator &I) {
96
15.4M
    I = getBundleBegin(std::next(I));
97
15.4M
  }
98
99
  /// Decrement reverse ilist iterator.
100
291
  template <class Iterator> static void decrement(Iterator &I) {
101
291
    I = std::prev(getBundleFinal(I));
102
291
  }
103
};
104
105
/// MachineBasicBlock iterator that automatically skips over MIs that are
106
/// inside bundles (i.e. walk top level MIs only).
107
template <typename Ty, bool IsReverse = false>
108
class MachineInstrBundleIterator : MachineInstrBundleIteratorHelper<IsReverse> {
109
  using Traits = MachineInstrBundleIteratorTraits<Ty, IsReverse>;
110
  using instr_iterator = typename Traits::instr_iterator;
111
112
  instr_iterator MII;
113
114
public:
115
  using value_type = typename instr_iterator::value_type;
116
  using difference_type = typename instr_iterator::difference_type;
117
  using pointer = typename instr_iterator::pointer;
118
  using reference = typename instr_iterator::reference;
119
  using const_pointer = typename instr_iterator::const_pointer;
120
  using const_reference = typename instr_iterator::const_reference;
121
  using iterator_category = std::bidirectional_iterator_tag;
122
123
private:
124
  using nonconst_instr_iterator = typename Traits::nonconst_instr_iterator;
125
  using const_instr_iterator = typename Traits::const_instr_iterator;
126
  using nonconst_iterator =
127
      MachineInstrBundleIterator<typename nonconst_instr_iterator::value_type,
128
                                 IsReverse>;
129
  using reverse_iterator = MachineInstrBundleIterator<Ty, !IsReverse>;
130
131
public:
132
1.39G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
1.39G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
1.39G
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
1.39G
           "bundled MI");
136
1.39G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, false>)
Line
Count
Source
132
1.26G
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
1.26G
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
1.26G
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
1.26G
           "bundled MI");
136
1.26G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true>)
Line
Count
Source
132
95.4M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
95.4M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
95.4M
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
95.4M
           "bundled MI");
136
95.4M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>)
Line
Count
Source
132
4.45M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
4.45M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
4.45M
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
4.45M
           "bundled MI");
136
4.45M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
132
26.1M
  MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {
133
26.1M
    assert((!MI.getNodePtr() || MI.isEnd() || !MI->isBundledWithPred()) &&
134
26.1M
           "It's not legal to initialize MachineInstrBundleIterator with a "
135
26.1M
           "bundled MI");
136
26.1M
  }
137
138
22.3M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
22.3M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
22.3M
                                      "MachineInstrBundleIterator with a "
141
22.3M
                                      "bundled MI");
142
22.3M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
138
19.9M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
19.9M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
19.9M
                                      "MachineInstrBundleIterator with a "
141
19.9M
                                      "bundled MI");
142
19.9M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
138
2.37M
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
2.37M
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
2.37M
                                      "MachineInstrBundleIterator with a "
141
2.37M
                                      "bundled MI");
142
2.37M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr&)
Line
Count
Source
138
19.1k
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
19.1k
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
19.1k
                                      "MachineInstrBundleIterator with a "
141
19.1k
                                      "bundled MI");
142
19.1k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const&)
Line
Count
Source
138
473
  MachineInstrBundleIterator(reference MI) : MII(MI) {
139
473
    assert(!MI.isBundledWithPred() && "It's not legal to initialize "
140
473
                                      "MachineInstrBundleIterator with a "
141
473
                                      "bundled MI");
142
473
  }
143
144
93.0M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
93.0M
    // FIXME: This conversion should be explicit.
146
93.0M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
93.0M
                                                "MachineInstrBundleIterator "
148
93.0M
                                                "with a bundled MI");
149
93.0M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
144
91.0M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
91.0M
    // FIXME: This conversion should be explicit.
146
91.0M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
91.0M
                                                "MachineInstrBundleIterator "
148
91.0M
                                                "with a bundled MI");
149
91.0M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
144
2.03M
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
2.03M
    // FIXME: This conversion should be explicit.
146
2.03M
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
2.03M
                                                "MachineInstrBundleIterator "
148
2.03M
                                                "with a bundled MI");
149
2.03M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator(llvm::MachineInstr*)
Line
Count
Source
144
8.05k
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
8.05k
    // FIXME: This conversion should be explicit.
146
8.05k
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
8.05k
                                                "MachineInstrBundleIterator "
148
8.05k
                                                "with a bundled MI");
149
8.05k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::MachineInstrBundleIterator(llvm::MachineInstr const*)
Line
Count
Source
144
546
  MachineInstrBundleIterator(pointer MI) : MII(MI) {
145
546
    // FIXME: This conversion should be explicit.
146
546
    assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize "
147
546
                                                "MachineInstrBundleIterator "
148
546
                                                "with a bundled MI");
149
546
  }
150
151
  // Template allows conversion from const to nonconst.
152
  template <class OtherTy>
153
  MachineInstrBundleIterator(
154
      const MachineInstrBundleIterator<OtherTy, IsReverse> &I,
155
      typename std::enable_if<std::is_convertible<OtherTy *, Ty *>::value,
156
                              void *>::type = nullptr)
157
61.4M
      : MII(I.getInstrIterator()) {}
158
159
39.9M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::MachineInstrBundleIterator()
Line
Count
Source
159
38.4M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::MachineInstrBundleIterator()
Line
Count
Source
159
1.46M
  MachineInstrBundleIterator() : MII(nullptr) {}
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::MachineInstrBundleIterator()
Line
Count
Source
159
13.7k
  MachineInstrBundleIterator() : MII(nullptr) {}
160
161
  /// Explicit conversion between forward/reverse iterators.
162
  ///
163
  /// Translate between forward and reverse iterators without changing range
164
  /// boundaries.  The resulting iterator will dereference (and have a handle)
165
  /// to the previous node, which is somewhat unexpected; but converting the
166
  /// two endpoints in a range will give the same range in reverse.
167
  ///
168
  /// This matches std::reverse_iterator conversions.
169
  explicit MachineInstrBundleIterator(
170
      const MachineInstrBundleIterator<Ty, !IsReverse> &I)
171
306
      : MachineInstrBundleIterator(++I.getReverse()) {}
172
173
  /// Get the bundle iterator for the given instruction's bundle.
174
13.5M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
175
13.5M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
176
13.5M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getAtBundleBegin(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, false>)
Line
Count
Source
174
11.2M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
175
11.2M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
176
11.2M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::getAtBundleBegin(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, true, true>)
Line
Count
Source
174
2.22M
  static MachineInstrBundleIterator getAtBundleBegin(instr_iterator MI) {
175
2.22M
    return MachineInstrBundleIteratorHelper<IsReverse>::getBundleBegin(MI);
176
2.22M
  }
177
178
2.67G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator*() const
Line
Count
Source
178
2.19G
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator*() const
Line
Count
Source
178
354M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator*() const
Line
Count
Source
178
111M
  reference operator*() const { return *MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator*() const
Line
Count
Source
178
15.4M
  reference operator*() const { return *MII; }
179
744M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator->() const
Line
Count
Source
179
702M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator->() const
Line
Count
Source
179
35.4M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator->() const
Line
Count
Source
179
6.15M
  pointer operator->() const { return &operator*(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator->() const
Line
Count
Source
179
4.31k
  pointer operator->() const { return &operator*(); }
180
181
  /// Check for null.
182
0
  bool isValid() const { return MII.getNodePtr(); }
183
184
  friend bool operator==(const MachineInstrBundleIterator &L,
185
2.16G
                         const MachineInstrBundleIterator &R) {
186
2.16G
    return L.MII == R.MII;
187
2.16G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
185
1.77G
                         const MachineInstrBundleIterator &R) {
186
1.77G
    return L.MII == R.MII;
187
1.77G
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
185
114M
                         const MachineInstrBundleIterator &R) {
186
114M
    return L.MII == R.MII;
187
114M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
185
263M
                         const MachineInstrBundleIterator &R) {
186
263M
    return L.MII == R.MII;
187
263M
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
185
17.6M
                         const MachineInstrBundleIterator &R) {
186
17.6M
    return L.MII == R.MII;
187
17.6M
  }
188
  friend bool operator==(const MachineInstrBundleIterator &L,
189
15.9k
                         const const_instr_iterator &R) {
190
15.9k
    return L.MII == R; // Avoid assertion about validity of R.
191
15.9k
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> const&)
Line
Count
Source
189
15.8k
                         const const_instr_iterator &R) {
190
15.8k
    return L.MII == R; // Avoid assertion about validity of R.
191
15.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
189
98
                         const const_instr_iterator &R) {
190
98
    return L.MII == R; // Avoid assertion about validity of R.
191
98
  }
192
  friend bool operator==(const const_instr_iterator &L,
193
5.55M
                         const MachineInstrBundleIterator &R) {
194
5.55M
    return L == R.MII; // Avoid assertion about validity of L.
195
5.55M
  }
llvm::operator==(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
193
162k
                         const MachineInstrBundleIterator &R) {
194
162k
    return L == R.MII; // Avoid assertion about validity of L.
195
162k
  }
llvm::operator==(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineInstr, true, true, void>, false, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
193
5.39M
                         const MachineInstrBundleIterator &R) {
194
5.39M
    return L == R.MII; // Avoid assertion about validity of L.
195
5.39M
  }
196
  friend bool operator==(const MachineInstrBundleIterator &L,
197
84.4k
                         const nonconst_instr_iterator &R) {
198
84.4k
    return L.MII == R; // Avoid assertion about validity of R.
199
84.4k
  }
200
  friend bool operator==(const nonconst_instr_iterator &L,
201
22.4k
                         const MachineInstrBundleIterator &R) {
202
22.4k
    return L == R.MII; // Avoid assertion about validity of L.
203
22.4k
  }
204
15.9k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
205
15.9k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
206
15.9k
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstr const*)
Line
Count
Source
204
15.8k
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
205
15.8k
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
206
15.8k
  }
llvm::operator==(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstr const*)
Line
Count
Source
204
29
  friend bool operator==(const MachineInstrBundleIterator &L, const_pointer R) {
205
29
    return L == const_instr_iterator(R); // Avoid assertion about validity of R.
206
29
  }
207
3.78M
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
208
3.78M
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
209
3.78M
  }
llvm::operator==(llvm::MachineInstr const*, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
207
162k
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
208
162k
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
209
162k
  }
llvm::operator==(llvm::MachineInstr const*, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
207
3.61M
  friend bool operator==(const_pointer L, const MachineInstrBundleIterator &R) {
208
3.61M
    return const_instr_iterator(L) == R; // Avoid assertion about validity of L.
209
3.61M
  }
210
  friend bool operator==(const MachineInstrBundleIterator &L,
211
101
                         const_reference R) {
212
101
    return L == &R; // Avoid assertion about validity of R.
213
101
  }
214
  friend bool operator==(const_reference L,
215
160k
                         const MachineInstrBundleIterator &R) {
216
160k
    return &L == R; // Avoid assertion about validity of L.
217
160k
  }
218
219
  friend bool operator!=(const MachineInstrBundleIterator &L,
220
1.82G
                         const MachineInstrBundleIterator &R) {
221
1.82G
    return !(L == R);
222
1.82G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&)
Line
Count
Source
220
1.44G
                         const MachineInstrBundleIterator &R) {
221
1.44G
    return !(L == R);
222
1.44G
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, true> const&)
Line
Count
Source
220
114M
                         const MachineInstrBundleIterator &R) {
221
114M
    return !(L == R);
222
114M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true> const&)
Line
Count
Source
220
17.6M
                         const MachineInstrBundleIterator &R) {
221
17.6M
    return !(L == R);
222
17.6M
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&)
Line
Count
Source
220
244M
                         const MachineInstrBundleIterator &R) {
221
244M
    return !(L == R);
222
244M
  }
223
  friend bool operator!=(const MachineInstrBundleIterator &L,
224
                         const const_instr_iterator &R) {
225
    return !(L == R);
226
  }
227
  friend bool operator!=(const const_instr_iterator &L,
228
1.77M
                         const MachineInstrBundleIterator &R) {
229
1.77M
    return !(L == R);
230
1.77M
  }
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
228
61
                         const MachineInstrBundleIterator &R) {
229
61
    return !(L == R);
230
61
  }
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
228
1.77M
                         const MachineInstrBundleIterator &R) {
229
1.77M
    return !(L == R);
230
1.77M
  }
231
  friend bool operator!=(const MachineInstrBundleIterator &L,
232
34.3k
                         const nonconst_instr_iterator &R) {
233
34.3k
    return !(L == R);
234
34.3k
  }
235
  friend bool operator!=(const nonconst_instr_iterator &L,
236
4.89k
                         const MachineInstrBundleIterator &R) {
237
4.89k
    return !(L == R);
238
4.89k
  }
239
14.8k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
240
14.8k
    return !(L == R);
241
14.8k
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false> const&, llvm::MachineInstr const*)
Line
Count
Source
239
14.7k
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
240
14.7k
    return !(L == R);
241
14.7k
  }
llvm::operator!=(llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false> const&, llvm::MachineInstr const*)
Line
Count
Source
239
29
  friend bool operator!=(const MachineInstrBundleIterator &L, const_pointer R) {
240
29
    return !(L == R);
241
29
  }
242
3.58M
  friend bool operator!=(const_pointer L, const MachineInstrBundleIterator &R) {
243
3.58M
    return !(L == R);
244
3.58M
  }
245
  friend bool operator!=(const MachineInstrBundleIterator &L,
246
                         const_reference R) {
247
    return !(L == R);
248
  }
249
  friend bool operator!=(const_reference L,
250
                         const MachineInstrBundleIterator &R) {
251
    return !(L == R);
252
  }
253
254
  // Increment and decrement operators...
255
392M
  MachineInstrBundleIterator &operator--() {
256
392M
    this->decrement(MII);
257
392M
    return *this;
258
392M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--()
Line
Count
Source
255
354M
  MachineInstrBundleIterator &operator--() {
256
354M
    this->decrement(MII);
257
354M
    return *this;
258
354M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--()
Line
Count
Source
255
37.8M
  MachineInstrBundleIterator &operator--() {
256
37.8M
    this->decrement(MII);
257
37.8M
    return *this;
258
37.8M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator--()
Line
Count
Source
255
291
  MachineInstrBundleIterator &operator--() {
256
291
    this->decrement(MII);
257
291
    return *this;
258
291
  }
259
1.37G
  MachineInstrBundleIterator &operator++() {
260
1.37G
    this->increment(MII);
261
1.37G
    return *this;
262
1.37G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++()
Line
Count
Source
259
1.02G
  MachineInstrBundleIterator &operator++() {
260
1.02G
    this->increment(MII);
261
1.02G
    return *this;
262
1.02G
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++()
Line
Count
Source
259
104M
  MachineInstrBundleIterator &operator++() {
260
104M
    this->increment(MII);
261
104M
    return *this;
262
104M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++()
Line
Count
Source
259
224M
  MachineInstrBundleIterator &operator++() {
260
224M
    this->increment(MII);
261
224M
    return *this;
262
224M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++()
Line
Count
Source
259
15.4M
  MachineInstrBundleIterator &operator++() {
260
15.4M
    this->increment(MII);
261
15.4M
    return *this;
262
15.4M
  }
263
47.6k
  MachineInstrBundleIterator operator--(int) {
264
47.6k
    MachineInstrBundleIterator Temp = *this;
265
47.6k
    --*this;
266
47.6k
    return Temp;
267
47.6k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator--(int)
Line
Count
Source
263
47.4k
  MachineInstrBundleIterator operator--(int) {
264
47.4k
    MachineInstrBundleIterator Temp = *this;
265
47.4k
    --*this;
266
47.4k
    return Temp;
267
47.4k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator--(int)
Line
Count
Source
263
202
  MachineInstrBundleIterator operator--(int) {
264
202
    MachineInstrBundleIterator Temp = *this;
265
202
    --*this;
266
202
    return Temp;
267
202
  }
268
125M
  MachineInstrBundleIterator operator++(int) {
269
125M
    MachineInstrBundleIterator Temp = *this;
270
125M
    ++*this;
271
125M
    return Temp;
272
125M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::operator++(int)
Line
Count
Source
268
73.2M
  MachineInstrBundleIterator operator++(int) {
269
73.2M
    MachineInstrBundleIterator Temp = *this;
270
73.2M
    ++*this;
271
73.2M
    return Temp;
272
73.2M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::operator++(int)
Line
Count
Source
268
938k
  MachineInstrBundleIterator operator++(int) {
269
938k
    MachineInstrBundleIterator Temp = *this;
270
938k
    ++*this;
271
938k
    return Temp;
272
938k
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::operator++(int)
Line
Count
Source
268
51.7M
  MachineInstrBundleIterator operator++(int) {
269
51.7M
    MachineInstrBundleIterator Temp = *this;
270
51.7M
    ++*this;
271
51.7M
    return Temp;
272
51.7M
  }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, true>::operator++(int)
Line
Count
Source
268
473
  MachineInstrBundleIterator operator++(int) {
269
473
    MachineInstrBundleIterator Temp = *this;
270
473
    ++*this;
271
473
    return Temp;
272
473
  }
273
274
220M
  instr_iterator getInstrIterator() const { return MII; }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getInstrIterator() const
Line
Count
Source
274
220M
  instr_iterator getInstrIterator() const { return MII; }
Unexecuted instantiation: llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getInstrIterator() const
275
276
20.1M
  nonconst_iterator getNonConstIterator() const { return MII.getNonConst(); }
277
278
  /// Get a reverse iterator to the same node.
279
  ///
280
  /// Gives a reverse iterator that will dereference (and have a handle) to the
281
  /// same node.  Converting the endpoint iterators in a range will give a
282
  /// different range; for range operations, use the explicit conversions.
283
279k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>::getReverse() const
Line
Count
Source
283
251k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr, true>::getReverse() const
Line
Count
Source
283
27.6k
  reverse_iterator getReverse() const { return MII.getReverse(); }
llvm::MachineInstrBundleIterator<llvm::MachineInstr const, false>::getReverse() const
Line
Count
Source
283
10
  reverse_iterator getReverse() const { return MII.getReverse(); }
284
};
285
286
} // end namespace llvm
287
288
#endif // LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H