[llvm] [MachineSink] Use SmallDenseMap (NFC) (PR #95676)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 15 11:13:19 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/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.
>From 610fe545aeb60e79bf66966e9a6b803fb6554730 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 24 Jan 2024 10:20:08 -0800
Subject: [PATCH] [MachineSink] Use SmallDenseMap (NFC)
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.
---
llvm/lib/CodeGen/MachineSink.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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