[llvm] [MachineSink] Extend loop sinking capability (PR #117247)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 09:28:34 PST 2025
jrbyrnes wrote:
Hey @preames --
At the moment, I don't really have plans to continue along this direction -- we needed some short-term way to cope with code that had huge live-in sets. The heuristics are okay -- I assume that the RP calculations are inaccurate, and there is no evaluation of latency of sunk code vs RP / spill reduction. But for our usescases, they are sufficient.
For our (AMDGPU) backend, the long term approach is to do rematerialization during scheduling. At that point, we have a better idea of the final state of RP, and more accurate info regarding latency. Using this approach we are also able to write target specific remat / sink strategies. Although I would expect the basic principles of said strategies to be universal, different targets tend to care about RP in different ways that are not always easy to express via a hook.
https://github.com/llvm/llvm-project/pull/117247
More information about the llvm-commits
mailing list