[llvm] 1432be4 - [InstCombine] Use DenseMap instead of MapVector (NFC) (#214536)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 8 16:31:20 PDT 2026


Author: Kazu Hirata
Date: 2026-08-08T16:31:15-07:00
New Revision: 1432be4ea6ddffb6ea4e19925e8e12734753c3c8

URL: https://github.com/llvm/llvm-project/commit/1432be4ea6ddffb6ea4e19925e8e12734753c3c8
DIFF: https://github.com/llvm/llvm-project/commit/1432be4ea6ddffb6ea4e19925e8e12734753c3c8.diff

LOG: [InstCombine] Use DenseMap instead of MapVector (NFC) (#214536)

WorkMap is accessed only via MapVector::operator[] and lookup.

This patch changes its type to DenseMap to avoid populating the vector
portion of MapVector.

Added: 
    

Modified: 
    llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 14ccd6b2dfa24..edf046b32c32c 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -260,7 +260,7 @@ class PointerReplacer {
   }
 
   SmallSetVector<Instruction *, 32> UsersToReplace;
-  MapVector<Value *, Value *> WorkMap;
+  DenseMap<Value *, Value *> WorkMap;
   InstCombinerImpl &IC;
   Instruction &Root;
   unsigned FromAS;


        


More information about the llvm-commits mailing list