[PATCH] D119475: [AMDGPU] Add scheduler pass to rematerialize trivial defs
Vang Thao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 16:01:45 PST 2022
vangthao added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:894
+
+ auto *BBNonDbgMI = &*skipDebugInstructionsForward(Regions[HighRPIdx].first,
+ Regions[HighRPIdx].second);
----------------
rampitec wrote:
> 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.
Ah thanks! I think I understand now. Updated in latest diff.
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