6 Commits

Author SHA1 Message Date
Valery Pykhtin
901c5be524
[AMDGPU] Fix GCNUpwardRPTracker: max register pressure on defs. (#74422)
Treat a defined register as fully live "at" the instruction and update maximum pressure accordingly. Fixes #3786.
2023-12-08 11:27:08 +01:00
Valery Pykhtin
ecf8818380
[AMDGPU] Presubmit test: max register pressure on defs. (#74424)
Upcoming patch #74422.
2023-12-05 13:23:49 +01:00
Piotr Sobczak
73d9f5fda6
[AMDGPU] Add test for GCNRegPressure tracker bug (#73786)
Add a test to document an existing problem in GCNRegPressure tracker.

The upward tracker does not count the registers used (16 of them) in
movrel instruction (for example V_INDIRECT_REG_WRITE_MOVREL_B32_V16).

The downward tracker counts the registers but reports a mismatch:
%0:L0000000000000C00 isn't found in LIS reported set
2023-11-30 16:26:44 +01:00
Valery Pykhtin
57a11b7f75
[AMDGPU] Add live-through register set printing to GCNRegPressurePrinter pass. (#71096)
Add live-through register set printing, assuming live-through register
is in live-in and live-out sets, has no redefinitions but may have uses
in the block.
2023-11-20 13:35:47 +01:00
Valery Pykhtin
87b8d94371
[AMDGPU] Fix GCNUpwardRPTracker. (#71186)
Fixed:

1. Maximum register pressure calculation at the instruction level. 
Previously max RP included both def and use of registers of an
instruction. Now maximum RP includes _uses_ and _early-clobber defs_.

2. Uses were incorrectly tracked and this resulted in a mismatch of
live-in set reported by LiveIntervals and tracked live reg set when the
beginning of the block is reached.

Interface has changed, moveMaxPressure becomes deprecated and
getMaxPressure, resetMaxPressure functions are added. reset function
seem now more consistent.
2023-11-10 13:44:10 +01:00
Valery Pykhtin
e808f8a616
[AMDGPU] GCNRegPressurePrinter pass to print GCNRegPressure values for testing. (#70031)
Using GCNDownwardRPTracker or GCNUpwardRPTracker the pass collects register pressure values for a function and prints these values next to instructions. Output can be used to generate Filecheck rules in mir tests.
2023-11-01 23:01:39 +01:00