[all-commits] [llvm/llvm-project] 28322c: [AMDGPU] Add scheduler pass to rematerialize trivi...
vangthao95 via All-commits
all-commits at lists.llvm.org
Wed Mar 9 09:35:40 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 28322c25148e0dc70a48363b9b238520a612719d
https://github.com/llvm/llvm-project/commit/28322c25148e0dc70a48363b9b238520a612719d
Author: Vang Thao <Vang.Thao at amd.com>
Date: 2022-03-09 (Wed, 09 Mar 2022)
Changed paths:
M llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
M llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
M llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers.ll
M llvm/test/CodeGen/AMDGPU/dbg-value-ends-sched-region.mir
M llvm/test/CodeGen/AMDGPU/debug-value-scheduler-crash.mir
A llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats.mir
M llvm/test/CodeGen/AMDGPU/sched-assert-dead-def-subreg-use-other-subreg.mir
Log Message:
-----------
[AMDGPU] Add scheduler pass to rematerialize trivial defs
Add a new pass in the pre-ra AMDGPU scheduler to check if sinking trivially rematerializable defs that only has one use outside of the defining block will increase occupancy. If we can determine that occupancy can be increased, then rematerialize only the minimum amount of defs required to increase occupancy. Also re-schedule all regions that had occupancy matching the previous min occupancy using the new occupancy.
This is based off of the discussion in https://reviews.llvm.org/D117562.
The logic to determine the defs we should collect and determining if sinking would be beneficial is mostly the same. Main differences is that we are no longer limiting it to immediate defs and the def and use does not have to be part of a loop.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D119475
More information about the All-commits
mailing list