Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supports #5867.
Branched of #6721.
This PR has an ISPD and Secure CI associated an will be opened once it passes. Although
deleteUniqueInst()
has not use on this PR, it is tested by, after creating all Unique Instances incomputeUnique()
, deleting them all and adding them again.deleteUniqueInsts()
This function is responsible for deleting an unique inst and relocating all the unique insts data structures. Now that there needs to exist support for deleting unique insts, something that was not predicted by the original code, there might be a question to wether or not the current structures are the best. I've invited discussion about this structures, so here is a detailed explanation of how work, currently:
What is an Unique Instance?
Two instances of the same cell (same master) that have the same orientation and have the same offset from their preferred track pattern will have the same access pattern solution. This means that it is only necessary to solve it for one of those instances, and use that solution for the other, we say that they are the same unique instance.
A group of all instances that fall under the same unique instance is called an unique class. Currently, we elect the first instance of its class to represent the unique instance, this is referred as the head on the new code.
Here is a list of all current structures that manage unique instances:
Problems with the current structures:
Now that deleting is supported a few problem arise.
Deleting the last instance of its class:
This means that the class itself has to be deleted, implying that
unique_
will have a deletion (O(|uniques|) and thatunique_to_idx_
has to change to accommodate for that (O(|uniques|). There might be a better way to make this reciprocal data structures that are so unfriendly to deletion.Deleting the head of a class:
This means that a new head has to be elected, and that every value of
inst_to_unique_
of instance on that class have to be adjusting (O(|class|)).