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

Valery Pykhtin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 07:18:54 PDT 2017


vpykhtin added inline comments.


================
Comment at: lib/Target/AMDGPU/GCNRegPressure.cpp:305
+  MachineBasicBlock::const_iterator I = MI.getIterator();
+  I = skipDebugInstructionsForward(I, I->getParent()->end());
+  LiveRegs = LiveRegsCopy ? *LiveRegsCopy : getLiveRegsBefore(*I, LIS);
----------------
I think this should be the responsibility of the caller to account valid instructions, it would look unexpected that reset moves somewhere else.


================
Comment at: lib/Target/AMDGPU/GCNRegPressure.h:150
+  // move to the state at the MI
+  void advance(const MachineInstr &MI) {
+    advanceBefore(MI);
----------------
we have some inconsistency here: upward tracker's "reset" moves to the point after the MI, "recede" moves to the point before the MI, but downward reset and advance moves at.


Repository:
  rL LLVM

https://reviews.llvm.org/D33105





More information about the llvm-commits mailing list