rsz: Fix and clean up size move preliminaries#8237
Conversation
Make sure we don't attempt to size an instance which isn't a standard cell. Also clean up the clone move condition. This condition looks to have been introduced in commit 533c037 as a workaround for undo limitations (mistakenly with flipped logic) and carried over to other places. Signed-off-by: Martin Povišer <povik@cutebit.org>
|
FYI @mguthaus @precisionmoon regarding the clone move cleanup |
|
clang-tidy review says "All clean, LGTM! 👍" |
| // We always size the cloned gates for some reason, but it would be good if we | ||
| // also down-sized here instead since we might want smaller original. | ||
| if (!resizer_->dontTouch(drvr) | ||
| || resizer_->clone_move_->hasPendingMoves(drvr)) { |
There was a problem hiding this comment.
Removing the clone_move_->hasPendingMoves check should only matter for instances with dont touch. For that reason I'm expecting none or few metric changes. I can run a secure CI if we don't want to chance it.
| if (resizer_->dontTouch(load_inst) | ||
| || !resizer_->isLogicStdCell(load_inst)) { |
There was a problem hiding this comment.
I see similar checks in various places. Perhaps you could do a refactor similar to okToBufferNet like okToResizeInstance ?
There was a problem hiding this comment.
Do you want to do this here or in another?
There was a problem hiding this comment.
I'd rather do this elsewhere. We could fold isLogicStdCell into dontTouch as I'm not sure there's any transformation we want the resizer to apply to macros.
Make sure we don't attempt to size an instance which isn't a standard cell. Also clean up the clone move condition. This condition looks to have been introduced in commit 533c037 as a workaround for undo limitations (mistakenly with flipped logic) and carried over to other places.