Skip to content

rsz: prevent high fanout nets from allocating permanent massive map - #11865

Merged
jhkim-pii merged 1 commit into
The-OpenROAD-Project:masterfrom
mikesinouye:cache
Oct 20, 2026
Merged

jhkim-pii merged 1 commit into
The-OpenROAD-Project:masterfrom
mikesinouye:cache

Conversation

@mikesinouye

Copy link
Copy Markdown
Contributor

Summary

During global_placement -timing_driven, a single high fanout net causes buffer_delay_cache_ to rehash to a large bucket count. The size is never reset, so every subsequent driver pin in fullyRebuffer() (hundreds of thousands of small 1–2 sink nets) pays a massive memset cost for the map.

Type of Change

  • Bug fix

Impact

Prevents hanging in global_placement -timing_driven observed after #11798.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Related Issues

#11798.

Signed-off-by: Mike Inouye <mikeinouye@google.com>
@mikesinouye
mikesinouye requested a review from a team as a code owner October 20, 2026 17:16
@mikesinouye
mikesinouye requested a review from jhkim-pii October 20, 2026 17:16

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request optimizes the Rebuffer::setPin method in src/rsz/src/Rebuffer.cc by preventing performance degradation during cache clearing. Instead of always calling clear() on buffer_delay_cache_, which can become slow if the bucket count grows too large, the code now checks if the bucket count exceeds a threshold of 256. If it does, the cache is reinitialized to release the large bucket arrays and maintain O(1) complexity across nets. There are no review comments, and we have no additional feedback to provide.

@jhkim-pii
jhkim-pii enabled auto-merge October 20, 2026 17:34
@jhkim-pii
jhkim-pii merged commit 201e7e8 into The-OpenROAD-Project:master Oct 20, 2026
20 of 21 checks passed
@mikesinouye
mikesinouye deleted the cache branch October 20, 2026 17:59
@mikesinouye

Copy link
Copy Markdown
Contributor Author

Thank you for the quick review Jaehyun!

@jhkim-pii

Copy link
Copy Markdown
Contributor

No problem. Thank you for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants