[PATCH] D51160: Adjust MIScheduler to use ProcResource counts
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 04:59:14 PDT 2019
andreadb accepted this revision.
andreadb added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1979-1980
+ unsigned NumberOfInstances = SchedModel->getProcResource(PIdx)->NumUnits;
+ assert(NumberOfInstances > 0 &&
+ "Cannot have zero instances of a ProcResource");
+
----------------
chill wrote:
> andreadb wrote:
> > We should probably enforce this constraint in the SubtargetEmitter and error out if a processor resource declares zero (or negative) units.
> >
> > (In practice, none of the models available upstream declares a resource with zero units. Only the 'InvalidUnit' at index 0 defaults to having zero units).
> That would be for a separate patch, wouldn't it ?
>
Yes. That would be a follow-up patch.
You can commit this change since it is good (and it was already approved by @atrick ).
Thanks,
Andrea
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D51160/new/
https://reviews.llvm.org/D51160
More information about the llvm-commits
mailing list