This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Use more consistemt way to avoid overflow in the scheduler
ClosedPublic

Authored by rampitec on Jan 20 2023, 3:22 PM.

Details

Summary

Use more consistent way to avoid overflow when calculating SGPR
and VGPR pressure limits.

Diff Detail

Event Timeline

rampitec created this revision.Jan 20 2023, 3:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 3:22 PM
rampitec requested review of this revision.Jan 20 2023, 3:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 3:22 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added inline comments.Jan 20 2023, 6:29 PM
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
93

clamp with min of 0 seems weird. Also could use -=

rampitec updated this revision to Diff 491031.Jan 20 2023, 9:28 PM
rampitec marked an inline comment as done.
rampitec retitled this revision from [AMDGPU] Use std::clamp to avoid overflow in the scheduler to [AMDGPU] Use more consistemt way to avoid overflow in the scheduler.
rampitec edited the summary of this revision. (Show Details)
kerbowa accepted this revision.Jan 22 2023, 10:27 PM
This revision is now accepted and ready to land.Jan 22 2023, 10:27 PM