[AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions
authorVang Thao <Vang.Thao@amd.com>
Fri, 25 Mar 2022 18:36:34 +0000 (11:36 -0700)
committerVang Thao <Vang.Thao@amd.com>
Fri, 8 Apr 2022 20:08:32 +0000 (13:08 -0700)
commit311edc6b5b05f2f1a0151df8c9d054b6fdbf02a1
tree7bd9bfaeb3be398a213a5303b5f0960d8060b63a
parent61df26c86cfec01317fba4f2509bc7469fff13d9
[AMDGPU] Enable PreRARematerialize scheduling pass with multiple high RP regions

Enable the PreRARematerialize pass when there are multiple high RP scheduling
regions present. Require the occupancy in all high RP regions be improved
before finalizing sinking. If any high RP region did not improve in occupancy
then un-do all sinking and restore the state to before the pass.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D122501
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats.mir