[llvm] [RFC][MC] Cache MCRegAliasIterator (PR #93510)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 00:27:39 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;
----------------
Pierre-vh wrote:
Realistically I don't know if a program could use all registers available. I don't think so.
Theoretically, there are 9000 registers and I'm not sure how much space DenseMap needs, I think it's a lot more than what std::vector would use
https://github.com/llvm/llvm-project/pull/93510
More information about the llvm-commits
mailing list