@@ -4269,15 +4269,15 @@ static bool sortIntervals(const ResourceSegments::IntervalTy &A,
42694269}
42704270
42714271unsigned ResourceSegments::getFirstAvailableAt (
4272- unsigned CurrCycle, unsigned AcquireAtCycle, unsigned Cycle ,
4272+ unsigned CurrCycle, unsigned AcquireAtCycle, unsigned ReleaseAtCycle ,
42734273 std::function<ResourceSegments::IntervalTy(unsigned , unsigned , unsigned )>
42744274 IntervalBuilder) const {
42754275 assert (std::is_sorted (std::begin (_Intervals), std::end (_Intervals),
42764276 sortIntervals) &&
42774277 " Cannot execute on an un-sorted set of intervals." );
42784278 unsigned RetCycle = CurrCycle;
42794279 ResourceSegments::IntervalTy NewInterval =
4280- IntervalBuilder (RetCycle, AcquireAtCycle, Cycle );
4280+ IntervalBuilder (RetCycle, AcquireAtCycle, ReleaseAtCycle );
42814281 for (auto &Interval : _Intervals) {
42824282 if (!intersects (NewInterval, Interval))
42834283 continue ;
@@ -4287,7 +4287,7 @@ unsigned ResourceSegments::getFirstAvailableAt(
42874287 assert (Interval.second > NewInterval.first &&
42884288 " Invalid intervals configuration." );
42894289 RetCycle += (unsigned )Interval.second - (unsigned )NewInterval.first ;
4290- NewInterval = IntervalBuilder (RetCycle, AcquireAtCycle, Cycle );
4290+ NewInterval = IntervalBuilder (RetCycle, AcquireAtCycle, ReleaseAtCycle );
42914291 }
42924292 return RetCycle;
42934293}
0 commit comments