[llvm] [CodeGen][MISched] Handle empty sized resource usage. (PR #75951)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 11:00:16 PST 2024


================
@@ -4266,6 +4266,12 @@ unsigned ResourceSegments::getFirstAvailableAt(
   assert(std::is_sorted(std::begin(_Intervals), std::end(_Intervals),
                         sortIntervals) &&
          "Cannot execute on an un-sorted set of intervals.");
+
+  // Zero resource usage is allowed by TargetSchedule.td but we do not construct
+  // a ResourceSegment interval for that situation.
+  if (AcquireAtCycle == Cycle)
----------------
nickdesaulniers wrote:

```
llvm-project/llvm/lib/CodeGen/MachineScheduler.cpp:4281:25: error: use of undeclared identifier 'Cycle'
  if (AcquireAtCycle == Cycle)
                        ^
```

https://lab.llvm.org/buildbot/#/builders/225/builds/30132

https://github.com/llvm/llvm-project/pull/75951


More information about the llvm-commits mailing list