Skip to content

Sta latest 0528#367

Merged
maliberty merged 8 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:sta_latest_0528
May 28, 2026
Merged

Sta latest 0528#367
maliberty merged 8 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:sta_latest_0528

Conversation

@dsengupta0628
Copy link
Copy Markdown
Contributor

Latest upstream OpenSTA

Note that hashPtr was removed from sta upstream (commit ffd54f3 "rm hashPtr").
So we need fix two OpenROAD callers: est/EstimateParasitics.h:47 and rsz/Resizer.hh:88 to build OpenROAD succesfully.

dsengupta0628 and others added 8 commits May 20, 2026 13:55
* fix makeConcreteParasitics leak

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>

* simplify test, update the address review comment

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>

* reduce test verbosity

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>

---------

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: Masanori Ogino <masanori.ogino@gmail.com>
Signed-off-by: James Cherry <cherry@CerezoBook.local>
Signed-off-by: James Cherry <cherry@CerezoBook.local>
Signed-off-by: James Cherry <cherry@CerezoBook.local>
@dsengupta0628 dsengupta0628 self-assigned this May 28, 2026
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 4 committers have signed the CLA.

✅ dsengupta0628
❌ jjcherry56
❌ omasanori
❌ James Cherry


James Cherry seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

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

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 updates CUDD installation instructions, adds a new Homebrew TCL path for macOS, removes pointer hashing utilities, and introduces unsetAnnotatedSlew. It also fixes a memory leak in makeConcreteParasitics by freeing existing map entries before overwriting them, which is verified by a new regression test. Feedback suggests optimizing this memory leak fix by directly updating the map node pointer and utilizing transparent lookup with std::string_view to avoid unnecessary allocations and map rebalancing.

Comment thread search/Sta.cc
Comment on lines +4336 to 4345
// Free the prior entry to avoid leaking it on overwrite.
std::string key(name);
auto it = parasitics_name_map_.find(key);
if (it != parasitics_name_map_.end()) {
delete it->second;
parasitics_name_map_.erase(it);
}
Parasitics *parasitics = new ConcreteParasitics(name, filename, this);
parasitics_name_map_[std::string(name)] = parasitics;
parasitics_name_map_[key] = parasitics;
return parasitics;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Instead of erasing the old entry and inserting a new one, you can directly update the pointer of the existing map node. Since parasitics_name_map_ uses std::less<> as a transparent comparator, you can also search using std::string_view directly without allocating a temporary std::string key. This avoids rebalancing the map's red-black tree twice and avoids unnecessary string allocations.

  auto it = parasitics_name_map_.find(name);
  if (it != parasitics_name_map_.end()) {
    delete it->second;
    it->second = new ConcreteParasitics(name, filename, this);
    return it->second;
  }
  Parasitics *parasitics = new ConcreteParasitics(name, filename, this);
  parasitics_name_map_[std::string(name)] = parasitics;
  return parasitics;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cannot do this as it doesn't preserve the filename. It was already pointed by upstream OpenSTA developer that Gemini suggested change is incorrect

@maliberty maliberty merged commit 1475199 into The-OpenROAD-Project:master May 28, 2026
5 of 7 checks passed
@vvbandeira vvbandeira deleted the sta_latest_0528 branch May 28, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants