Skip to content

Commit

Permalink
[RegAllocFast] Use uint16_t SparseT for LiveRegMap
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aengelke committed Apr 27, 2023
1 parent 7fde0b2 commit 1e74373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/RegAllocFast.cpp
Expand Up @@ -106,7 +106,7 @@ namespace {
}
};

using LiveRegMap = SparseSet<LiveReg>;
using LiveRegMap = SparseSet<LiveReg, identity<unsigned>, uint16_t>;
/// This map contains entries for each virtual register that is currently
/// available in a physical register.
LiveRegMap LiveVirtRegs;
Expand Down

0 comments on commit 1e74373

Please sign in to comment.