@@ -61,6 +61,17 @@ static bool berase_if(MachineValueTypeSet &S, Predicate P) {
61
61
return Erased;
62
62
}
63
63
64
+ void MachineValueTypeSet::writeToStream (raw_ostream &OS) const {
65
+ SmallVector<MVT, 4 > Types (begin (), end ());
66
+ array_pod_sort (Types.begin (), Types.end ());
67
+
68
+ OS << ' [' ;
69
+ ListSeparator LS (" " );
70
+ for (const MVT &T : Types)
71
+ OS << LS << ValueTypeByHwMode::getMVTName (T);
72
+ OS << ' ]' ;
73
+ }
74
+
64
75
// --- TypeSetByHwMode
65
76
66
77
// This is a parameterized type-set class. For each mode there is a list
@@ -193,22 +204,11 @@ void TypeSetByHwMode::writeToStream(raw_ostream &OS) const {
193
204
OS << ' {' ;
194
205
for (unsigned M : Modes) {
195
206
OS << ' ' << getModeName (M) << ' :' ;
196
- writeToStream ( get (M), OS);
207
+ get (M). writeToStream ( OS);
197
208
}
198
209
OS << " }" ;
199
210
}
200
211
201
- void TypeSetByHwMode::writeToStream (const SetType &S, raw_ostream &OS) {
202
- SmallVector<MVT, 4 > Types (S.begin (), S.end ());
203
- array_pod_sort (Types.begin (), Types.end ());
204
-
205
- OS << ' [' ;
206
- ListSeparator LS (" " );
207
- for (const MVT &T : Types)
208
- OS << LS << ValueTypeByHwMode::getMVTName (T);
209
- OS << ' ]' ;
210
- }
211
-
212
212
bool TypeSetByHwMode::operator ==(const TypeSetByHwMode &VTS) const {
213
213
// The isSimple call is much quicker than hasDefault - check this first.
214
214
bool IsSimple = isSimple ();
@@ -253,6 +253,10 @@ bool TypeSetByHwMode::operator==(const TypeSetByHwMode &VTS) const {
253
253
}
254
254
255
255
namespace llvm {
256
+ raw_ostream &operator <<(raw_ostream &OS, const MachineValueTypeSet &T) {
257
+ T.writeToStream (OS);
258
+ return OS;
259
+ }
256
260
raw_ostream &operator <<(raw_ostream &OS, const TypeSetByHwMode &T) {
257
261
T.writeToStream (OS);
258
262
return OS;
0 commit comments