This keeps track of which modes are in VVT so we can find out
if a mode is missing later. But we can just ask VVT whether it
has a particular mode.
bool ContainsDefault = false;
MVT DT = MVT::Other;
- SmallSet<unsigned, 4> Modes;
for (const auto &P : VVT) {
unsigned M = P.first;
- Modes.insert(M);
// Make sure there exists a set for each specific mode from VVT.
Changed |= getOrCreate(M).insert(P.second).second;
// Cache VVT's default mode.
// modes in "this" that do not exist in VVT.
if (ContainsDefault)
for (auto &I : *this)
- if (!Modes.count(I.first))
+ if (!VVT.hasMode(I.first))
Changed |= I.second.insert(DT).second;
return Changed;