[TableGen] Use MachineValueTypeSet in place of SmallSet.
authorCraig Topper <craig.topper@sifive.com>
Sun, 18 Apr 2021 20:35:11 +0000 (13:35 -0700)
committerCraig Topper <craig.topper@sifive.com>
Sun, 18 Apr 2021 20:38:30 +0000 (13:38 -0700)
MachineValueTypeSet is effectively a std::bitset<256>. This allows
us quickly insert into the set and check if a type is in the set.

llvm/utils/TableGen/CodeGenDAGPatterns.cpp

index 72fe9fa..47e1085 100644 (file)
@@ -581,7 +581,7 @@ bool TypeInfer::EnforceVectorEltTypeIs(TypeSetByHwMode &Vec,
     Changed |= berase_if(E, isVector);  // Vector = !scalar
     assert(!V.empty() && !E.empty());
 
-    SmallSet<MVT,4> VT, ST;
+    MachineValueTypeSet VT, ST;
     // Collect element types from the "vector" set.
     for (MVT T : V)
       VT.insert(T.getVectorElementType());