[PATCH] D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 22:52:14 PDT 2019
steven.zhang added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1853
+SchedState::SchedState() :
+ CurrCycle(0), CurrMOps(0),
----------------
fhahn wrote:
> I guess this could go into the header.
ok
================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1941
unsigned ReadyCycle = (isTop() ? SU->TopReadyCycle : SU->BotReadyCycle);
- if (ReadyCycle > CurrCycle)
- return ReadyCycle - CurrCycle;
+ if (ReadyCycle > State.CurrCycle)
+ return ReadyCycle - State.CurrCycle;
----------------
fhahn wrote:
> I guess with this change, it would also make sense to use the getXXX functions here and elsewhere, instead of manually getting them from State.
The State will be read and updated by SchedBoundary. i.e.
```
RetiredMOps += IncMOps
```
If we want to have getXXX, we have to provide another setXXX, and my understanding is that, it is an internal data structure for SchedBoundary. Maybe, we could declare it as class, and it is a friend class of SchedBoundary ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59480/new/
https://reviews.llvm.org/D59480
More information about the llvm-commits
mailing list