[llvm] 50e222f - [MachineSink] Use SmallDenseMap (NFC) (#95676)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 15 13:21:11 PDT 2024


Author: Kazu Hirata
Date: 2024-06-15T13:21:07-07:00
New Revision: 50e222fa27bb636a392a6d6065f03a5469526ebf

URL: https://github.com/llvm/llvm-project/commit/50e222fa27bb636a392a6d6065f03a5469526ebf
DIFF: https://github.com/llvm/llvm-project/commit/50e222fa27bb636a392a6d6065f03a5469526ebf.diff

LOG: [MachineSink] Use SmallDenseMap (NFC) (#95676)

The use of SmallDenseMap saves 0.39% of heap allocations during the
compilation of a large preprocessed file, namely X86ISelLowering.cpp,
for the X86 target.

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineSink.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp
index 81b2fcfe78fd5..76947a419c347 100644
--- a/llvm/lib/CodeGen/MachineSink.cpp
+++ b/llvm/lib/CodeGen/MachineSink.cpp
@@ -138,7 +138,7 @@ namespace {
     DenseSet<Register> RegsToClearKillFlags;
 
     using AllSuccsCache =
-        DenseMap<MachineBasicBlock *, SmallVector<MachineBasicBlock *, 4>>;
+        SmallDenseMap<MachineBasicBlock *, SmallVector<MachineBasicBlock *, 4>>;
 
     /// DBG_VALUE pointer and flag. The flag is true if this DBG_VALUE is
     /// post-dominated by another DBG_VALUE of the same variable location.


        


More information about the llvm-commits mailing list