[PATCH] D33105: [AMDGPU] Turn register pressure estimation into forward tracker

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 23:29:34 PDT 2017


rampitec updated this revision to Diff 98723.
rampitec added a comment.

Split advance() into advanceBefore(MI) and advanceTo(MI).
The tracker does two things: tracks pressure and returns live reg set. A proper live-in set when advancing to an instruction is after we have committed all dead registers before moving to the new instruction, but before we have added new defs from that new instruction.
If we just call advance(), which sequentially calls advanceBefore() and advanceTo(), we would always get a correct live reg set at the MI argument, but that is not the same as live-in set before this instruction. Calling just advanceBefore() leaves it in a live-in state.
In addition added helper to clear maximum register pressure, which is also needed to be reset in between of these two steps if we are tracking the block and want to split it into regions.


Repository:
  rL LLVM

https://reviews.llvm.org/D33105

Files:
  lib/Target/AMDGPU/GCNRegPressure.cpp
  lib/Target/AMDGPU/GCNRegPressure.h
  lib/Target/AMDGPU/GCNSchedStrategy.cpp
  lib/Target/AMDGPU/GCNSchedStrategy.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33105.98723.patch
Type: text/x-patch
Size: 14348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170512/a611ebd0/attachment.bin>


More information about the llvm-commits mailing list