================
@@ -186,10 +186,23 @@ struct GCNRegPressure {
unsigned DynamicVGPRBlockSize);
};
+/// \returns the maximum of \p P1 and \p P2 for each register file. The VGPR
and
+/// AVGPR components are queried as one sum, so both come from the operand with
+/// the larger sum. The AGPR maximum stays separate also for a unified VGPR
+/// file: ArchVGPRs and AGPRs use separate ranges of it, so the unified
pressure
+/// is the sum of both peaks even when they are at different points.
inline GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2) {
GCNRegPressure Res;
for (unsigned I = 0; I < GCNRegPressure::ValueArraySize; ++I)
Res.Value[I] = std::max(P1.Value[I], P2.Value[I]);
+ for (unsigned Base : {0u, unsigned(GCNRegPressure::TOTAL_KINDS)}) {
----------------
vpykhtin wrote:
merge with the loop above
https://github.com/llvm/llvm-project/pull/236175
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits