[PATCH] D51160: Adjust MIScheduler to use ProcResource counts

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 04:01:11 PDT 2019


chill marked 3 inline comments as done.
chill added inline comments.


================
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");
+
----------------
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 ?



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

https://reviews.llvm.org/D51160





More information about the llvm-commits mailing list