[AMDGPU] Speedup GCNDownwardRPTracker::advanceBeforeNext
authorValery Pykhtin <valery.pykhtin@gmail.com>
Wed, 19 Oct 2022 16:07:19 +0000 (18:07 +0200)
committerValery Pykhtin <valery.pykhtin@gmail.com>
Fri, 2 Dec 2022 08:05:22 +0000 (09:05 +0100)
commit2d09bec169277fb5a341249afacff532c7511756
tree4065db731c98330edc3b2fc5a17b09116052a868
parent74034588bd1cf719f4838c57583bdd1e1ceb1064
[AMDGPU] Speedup GCNDownwardRPTracker::advanceBeforeNext

The function makes liveness tests for the entire live register set for every instruction it passes by.
This becomes very slow on high RP regions such as ASAN enabled code.

Instead only uses of last tracked instruction should be tested and this greatly improves compilation time.

This patch revealed few bugs in SIFormMemoryClauses and PreRARematStage::sinkTriviallyRematInsts which should
be fixed first.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D136267
llvm/lib/Target/AMDGPU/GCNRegPressure.cpp