This is an archive of the discontinued LLVM Phabricator instance.

[MISched] Do not erase resource booking history for subunits.
ClosedPublic

Authored by fpetrogalli on Jul 28 2023, 6:12 AM.

Details

Summary

When dealing with the subunits of a resource group, we should reset
the subunits availability at the first avaiable cycle of the resource
that contains the subunits. Previously, the reset operation was
returning cycle 0, effectively erasing the booking history of the
subunits.

Without this change, when using intervals for models have make use of
subunits, the erasing of resource booking for subunits can raise the
assertion "A resource is being overwritten" in
ResourceSegments::add. The test added in the patch is one of such
cases.

Diff Detail

Event Timeline

fpetrogalli created this revision.Jul 28 2023, 6:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 6:12 AM
fpetrogalli requested review of this revision.Jul 28 2023, 6:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 6:12 AM
fpetrogalli edited the summary of this revision. (Show Details)Jul 28 2023, 6:18 AM
fpetrogalli edited the summary of this revision. (Show Details)

Update: once D156540 is in, I will update this change and add a test.

Add regression tests for the bugfix.

fpetrogalli edited the summary of this revision. (Show Details)Jul 31 2023, 2:04 AM
andreadb accepted this revision.Aug 1 2023, 4:33 AM

LGTM

Ciao!

This revision is now accepted and ready to land.Aug 1 2023, 4:33 AM
fpetrogalli updated this revision to Diff 546003.EditedAug 1 2023, 4:44 AM

NFC. Describe the intent of the test in the patch with a comment.

This revision was landed with ongoing or failed builds.Aug 1 2023, 5:01 AM
This revision was automatically updated to reflect the committed changes.