[llvm] f08b171 - [TableGen] Use MachineValueTypeSet in place of SmallSet.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 18 13:38:50 PDT 2021
Author: Craig Topper
Date: 2021-04-18T13:38:30-07:00
New Revision: f08b171b18744a2e75f13e7d4860a51eebd4d5e8
URL: https://github.com/llvm/llvm-project/commit/f08b171b18744a2e75f13e7d4860a51eebd4d5e8
DIFF: https://github.com/llvm/llvm-project/commit/f08b171b18744a2e75f13e7d4860a51eebd4d5e8.diff
LOG: [TableGen] Use MachineValueTypeSet in place of SmallSet.
MachineValueTypeSet is effectively a std::bitset<256>. This allows
us quickly insert into the set and check if a type is in the set.
Added:
Modified:
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 72fe9faf81f8..47e1085b9142 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -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());
More information about the llvm-commits
mailing list