@@ -4269,15 +4269,15 @@ static bool sortIntervals(const ResourceSegments::IntervalTy &A,
4269
4269
}
4270
4270
4271
4271
unsigned ResourceSegments::getFirstAvailableAt (
4272
- unsigned CurrCycle, unsigned AcquireAtCycle, unsigned Cycle ,
4272
+ unsigned CurrCycle, unsigned AcquireAtCycle, unsigned ReleaseAtCycle ,
4273
4273
std::function<ResourceSegments::IntervalTy(unsigned , unsigned , unsigned )>
4274
4274
IntervalBuilder) const {
4275
4275
assert (std::is_sorted (std::begin (_Intervals), std::end (_Intervals),
4276
4276
sortIntervals) &&
4277
4277
" Cannot execute on an un-sorted set of intervals." );
4278
4278
unsigned RetCycle = CurrCycle;
4279
4279
ResourceSegments::IntervalTy NewInterval =
4280
- IntervalBuilder (RetCycle, AcquireAtCycle, Cycle );
4280
+ IntervalBuilder (RetCycle, AcquireAtCycle, ReleaseAtCycle );
4281
4281
for (auto &Interval : _Intervals) {
4282
4282
if (!intersects (NewInterval, Interval))
4283
4283
continue ;
@@ -4287,7 +4287,7 @@ unsigned ResourceSegments::getFirstAvailableAt(
4287
4287
assert (Interval.second > NewInterval.first &&
4288
4288
" Invalid intervals configuration." );
4289
4289
RetCycle += (unsigned )Interval.second - (unsigned )NewInterval.first ;
4290
- NewInterval = IntervalBuilder (RetCycle, AcquireAtCycle, Cycle );
4290
+ NewInterval = IntervalBuilder (RetCycle, AcquireAtCycle, ReleaseAtCycle );
4291
4291
}
4292
4292
return RetCycle;
4293
4293
}
0 commit comments