[llvm] [AMDGPU] Add flag to control VGPR pressure limits (PR #203797)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 04:23:31 PDT 2026
================
@@ -154,12 +182,31 @@ void GCNSchedStrategy::initialize(ScheduleDAGMI *DAG) {
VGPRBudget = std::max(VGPRBudget, Granule);
VGPRCriticalLimit = std::min(VGPRBudget, VGPRExcessLimit);
}
+ // Apply VGPR excess threshold percentage if specified.
+ if (VGPRExcessThresholdPercentOpt > 0) {
+ [[maybe_unused]] unsigned OriginalVGPRExcessLimit = VGPRExcessLimit;
+ [[maybe_unused]] unsigned OriginalVGPRCriticalLimit = VGPRCriticalLimit;
+ VGPRExcessLimit =
+ (VGPRExcessThresholdPercentOpt * VGPRExcessLimit + 99) / 100;
----------------
lucas-rami wrote:
Same as `std::ceil((VGPRExcessThresholdPercentOpt * VGPRExcessLimit) / 100)`? If yes I find it clearer
https://github.com/llvm/llvm-project/pull/203797
More information about the llvm-commits
mailing list