[PATCH] D139710: [AMDGPU] MachineScheduler: schedule execution metric added for the UnclusteredHighRPStage
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 02:51:37 PST 2022
vpykhtin added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:953
+ unsigned CurrCycle = 0;
+ for (auto SU : InputSchedule) {
+#ifndef NDEBUG
----------------
auto &SU
================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:1032
+ CurrentSchedule.push_back(*SU);
+ }
+
----------------
vpykhtin wrote:
> Unneeded copy. Add second version of getScheduleMetrics that can perform in MachineInstr*, you can translate an instruction to SUnit inside.
Sorry, I mean not second version but template, something like:
```
// shim accessors
SUnit &getSUnit(&DAG, MachineInstr *MI) { return DAG.getSUnit(MI); }
SUnit &getSUnit(&DAG, SUnit &SU) { return SU; }
template <typename Range>
ScheduleMetrics GCNSchedStage::getScheduleMetrics(Range &&S) {
...
for (auto &X : S) {
SUnit &SU = getSUnit(DAG, X);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139710/new/
https://reviews.llvm.org/D139710
More information about the llvm-commits
mailing list