diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/GCNRegPressure.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/GCNRegPressure.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.h b/llvm/lib/Target/AMDGPU/GCNRegPressure.h index 5862cdb041669..2ef79410719f6 100644 --- a/llvm/lib/Target/AMDGPU/GCNRegPressure.h +++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.h @@ -5,6 +5,14 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// +/// +/// \file +/// This file defines the GCNRegPressure class, which tracks registry pressure +/// by bookkeeping number of SGPR/VGPRs used, weights for large SGPR/VGPRs. It +/// also implements a compare function, which compares different register +/// pressures, and declares one with max occupance as winner. +/// +//===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_AMDGPU_GCNREGPRESSURE_H #define LLVM_LIB_TARGET_AMDGPU_GCNREGPRESSURE_H @@ -208,7 +216,7 @@ getLiveRegMap(Range &&R, bool After, LiveIntervals &LIS) { auto SI = SII.getInstructionIndex(*I); Indexes.push_back(After ? SI.getDeadSlot() : SI.getBaseIndex()); } - std::sort(Indexes.begin(), Indexes.end()); + llvm::sort(Indexes); auto &MRI = (*R.begin())->getParent()->getParent()->getRegInfo(); DenseMap<MachineInstr *, GCNRPTracker::LiveRegSet> LiveRegMap; |