From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/lib/Target/AMDGPU/GCNRegPressure.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target/AMDGPU/GCNRegPressure.h') 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 LiveRegMap; -- cgit v1.2.3