[llvm] [RFC][MC] Cache MCRegAliasIterator (PR #93510)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 03:02:17 PDT 2024


================
@@ -187,6 +187,9 @@ class MCRegisterInfo {
   DenseMap<MCRegister, int> L2SEHRegs;        // LLVM to SEH regs mapping
   DenseMap<MCRegister, int> L2CVRegs;         // LLVM to CV regs mapping
 
+  mutable std::vector<std::vector<MCPhysReg>> RegAliasesCache;
----------------
nikic wrote:

This is because `SmallVector<char>` sometimes needs to hold more than 4GB of data. Use of 64-bit sizes should probably be limited to just that case and not also extend to `SmallVector<uint16_t>`...

https://github.com/llvm/llvm-project/pull/93510


More information about the llvm-commits mailing list