[llvm] [AMDGPU][Scheduler] Refactor VGPR rematerialization during scheduling (PR #118722)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 03:51:00 PST 2024
lucas-rami wrote:
> The analysis doesn't prove that we will change occupancy through rematerialization -- I think this is a complex problem involving the live regs at the rematerialization point, which may change with scheduling. Because of this, we may want to keep the rollback functionality?
I completely agree, but my rationale for removing the rollback functionality is that after rescheduling `finalizeGCNRegion` -> `checkScheduling` -> `revertScheduling` can already revert scheduling on a per-region basis if we caused a drop in occupancy or extra spilling to happen, at the cost of a hit to compile-time compared to rollbacking immediately. I also suppose that rescheduling post-remat can improve occupancy/spilling beyond what we can assess at the end of rematerialization. Doing an immediate rollback would make us miss on those potential improvements I think.
https://github.com/llvm/llvm-project/pull/118722
More information about the llvm-commits
mailing list