Use a SparseMultiSet to track physical registers. Storage is only allocated once for the pass. It can be cleared in constant time and reused without any frees.
Declared in <llvm/CodeGen/ScheduleDAGInstrs.h>
using RegUnit2SUnitsMap = SparseMultiSet<PhysRegSUOper, MCRegUnit, MCRegUnitToIndex, uint16_t>;