[PATCH] D119022: [AMDGPU] Fix debug values in scheduler not placed correctly when reverting

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 09:05:36 PST 2022


vangthao added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:927
   }
-  DbgValues.clear();
-  FirstDbgValue = nullptr;
----------------
kerbowa wrote:
> Does this mean the machine schedule will now iterate through all debug instructions for the function when scheduling each region?
These two variables are only used when moving debug instructions back after scheduling is finished. This does not change the way the machine scheduler handle debug instructions.


================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:469
+  // pass debug instrs to the actual end of the scheduling region.
+  while (SkippedDebugInstr-- > 0)
+    ++RegionEnd;
----------------
kerbowa wrote:
> Do we need to specifically track the number of skipped debug instructions, or can we just advance RegionEnd until we stop seeing debug instructions?
I think skipping pass debug instructions until you reach a non-debug or the end of the block may also work.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119022/new/

https://reviews.llvm.org/D119022



More information about the llvm-commits mailing list