[llvm] [RegAlloc] Scale the spill weight by the weight of register class (PR #113675)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 8 22:36:39 PST 2024
lukel97 wrote:
> I think the `frequency` and the `size` here are the same thing as long as we are using reg units to scale the weight. For example, for a LMUL 8 register, we can consider it as that all its 8 registers have one use, `frequency+=8` and also `size+=8`.
Ah ok that makes sense to me at least for RISC-V, where a single LMUL 8 spill would be roughly the same as 8 * LMUL 1 spills. Does this hold for other targets though? E.g. could it be possible that spilling a register that uses two regunits costs the same as spilling another register that only uses one regunit?
https://github.com/llvm/llvm-project/pull/113675
More information about the llvm-commits
mailing list