[llvm] [llvm] Replace unordered_{map, set} with Dense{Map, Set} (PR #202222)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 7 13:15:13 PDT 2026


================
@@ -2152,7 +2152,7 @@ void addInstrRequirements(const MachineInstr &MI,
 
     // Check Layout operand in case if it's not a standard one and add the
     // appropriate capability.
-    std::unordered_map<unsigned, unsigned> LayoutToInstMap = {
+    DenseMap<unsigned, unsigned> LayoutToInstMap = {
----------------
aengelke wrote:

Wouldn't this be better served with a switch?

https://github.com/llvm/llvm-project/pull/202222


More information about the llvm-commits mailing list