From 1e743732e7879bed2f8cbc1a875569a3a5e147d8 Mon Sep 17 00:00:00 2001 From: Alexis Engelke Date: Wed, 26 Apr 2023 16:26:42 +0200 Subject: [PATCH] [RegAllocFast] Use uint16_t SparseT for LiveRegMap For functions with very large numbers of live variables, lookups into LiveRegMap previously detoriated to linear searches. This slightly increases memory usage, but that is barely measurable. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D149330 --- llvm/lib/CodeGen/RegAllocFast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index f60e176..17df5d6 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -106,7 +106,7 @@ namespace { } }; - using LiveRegMap = SparseSet; + using LiveRegMap = SparseSet, uint16_t>; /// This map contains entries for each virtual register that is currently /// available in a physical register. LiveRegMap LiveVirtRegs; -- 2.7.4