3 ms·
Compilers also may even spill data to stack from memory, even when the original location is still available, as can be seen in this issue: https://github.com/ll
by newpavlov 3y ago
Compilers also may even spill data to stack from memory, even when the original location is still available, as can be seen in this issue: https://github.com/llvm/llvm-project/issues/53348 https://github.com/llvm/llvm-project/issues/53348
I vaguely remember that it could allow high-end CPUs to use something similar to register renaming, i.e. stack locations like [rsp + 96] could stay in physical registers during code execution (high-end CPUs often have more physical registers, than logical ones), but I couldn't find a good reference confirming that such optimization is indeed used in practice.
Unfortunately, I think more often than note it causes performance regressions and in some cases it may even cause unnecessary stack spilling of sensitive data: https://github.com/rust-lang/rust/issues/88930#issuecomment-1734619004 https://github.com/rust-lang/rust/issues/88930#issuecomment-...