[llvm] [AMDGPU] Fix GCNUpwardRPTracker. (WIP) (PR #71186)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 09:16:55 PST 2023
================
@@ -128,14 +128,7 @@ class GCNRPTracker {
void clearMaxPressure() { MaxPressure.clear(); }
- GCNRegPressure getPressure() const { return CurPressure; }
-
- // returns MaxPressure, resetting it
- decltype(MaxPressure) moveMaxPressure() {
- auto Res = MaxPressure;
- MaxPressure.clear();
- return Res;
- }
+ const GCNRegPressure &getPressure() const { return CurPressure; }
----------------
jayfoad wrote:
Was this change intentional? Returning a ref seems less safe, because the caller has to be careful not to use it after mutating the tracker in any way.
https://github.com/llvm/llvm-project/pull/71186
More information about the llvm-commits
mailing list