diff options
| author | shadchin <[email protected]> | 2022-02-10 16:44:39 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:39 +0300 |
| commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
| tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/CodeGen/RegisterClassInfo.cpp | |
| parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/CodeGen/RegisterClassInfo.cpp')
| -rw-r--r-- | contrib/libs/llvm12/lib/CodeGen/RegisterClassInfo.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/libs/llvm12/lib/CodeGen/RegisterClassInfo.cpp b/contrib/libs/llvm12/lib/CodeGen/RegisterClassInfo.cpp index 0120cee7d7b..0488db3d09c 100644 --- a/contrib/libs/llvm12/lib/CodeGen/RegisterClassInfo.cpp +++ b/contrib/libs/llvm12/lib/CodeGen/RegisterClassInfo.cpp @@ -188,14 +188,14 @@ unsigned RegisterClassInfo::computePSetLimit(unsigned Idx) const { } assert(RC && "Failed to find register class"); compute(RC); - unsigned NAllocatableRegs = getNumAllocatableRegs(RC); - unsigned RegPressureSetLimit = TRI->getRegPressureSetLimit(*MF, Idx); - // If all the regs are reserved, return raw RegPressureSetLimit. - // One example is VRSAVERC in PowerPC. - // Avoid returning zero, getRegPressureSetLimit(Idx) assumes computePSetLimit - // return non-zero value. - if (NAllocatableRegs == 0) - return RegPressureSetLimit; - unsigned NReserved = RC->getNumRegs() - NAllocatableRegs; - return RegPressureSetLimit - TRI->getRegClassWeight(RC).RegWeight * NReserved; + unsigned NAllocatableRegs = getNumAllocatableRegs(RC); + unsigned RegPressureSetLimit = TRI->getRegPressureSetLimit(*MF, Idx); + // If all the regs are reserved, return raw RegPressureSetLimit. + // One example is VRSAVERC in PowerPC. + // Avoid returning zero, getRegPressureSetLimit(Idx) assumes computePSetLimit + // return non-zero value. + if (NAllocatableRegs == 0) + return RegPressureSetLimit; + unsigned NReserved = RC->getNumRegs() - NAllocatableRegs; + return RegPressureSetLimit - TRI->getRegClassWeight(RC).RegWeight * NReserved; } |
