[llvm] [RFC][MC] Cache MCRegAliasIterator (PR #93510)
    Carl Ritson via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jun 12 00:35:52 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 DenseMap<MCPhysReg, std::vector<MCPhysReg>> RegAliasesCache;
----------------
perlfu wrote:
Theoretical minimum size of worst case would be 8972*8972*2 -> ~154MiB?
The upfront cost of a 70KiB vector version without the risk of multiple megabyte map seems preferable.
https://github.com/llvm/llvm-project/pull/93510
    
    
More information about the llvm-commits
mailing list