[PATCH] D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 15:36:04 PST 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:894
+
+  auto *BBNonDbgMI = &*skipDebugInstructionsForward(Regions[HighRPIdx].first,
+                                                    Regions[HighRPIdx].second);
----------------
vangthao wrote:
> rampitec wrote:
> > I mean record it before you have done changes and then erase here.
> I believe the keys and BB live-ins are recorded before any passes are ran on the regions. This means that even the initial scheduling pass may have changed the first non-debug instruction causing us to be unable to easily obtain the key for the mapping for this MBB. Do you mean to record it before we run any scheduling passes at all?
I mean get it before you have erased instruction. Potentially the instruction it points to.

Good point about potential invalidation of the key due to scheduling, as a separate patch we need to fix these keys. Not a difficult fix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119475



More information about the llvm-commits mailing list