Skip to content

update OpenSTA ptr and files needed to compile OpenROAD post that update#10546

Merged
maliberty merged 4 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:or_update_sta_latest_0528
May 30, 2026
Merged

update OpenSTA ptr and files needed to compile OpenROAD post that update#10546
maliberty merged 4 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:or_update_sta_latest_0528

Conversation

@dsengupta0628

Copy link
Copy Markdown
Contributor

Summary

Fix build break after pulling latest OpenSTA (src/sta). Upstream commit ffd54f38 ("rm hashPtr") deleted the hashPtr macro from sta/Hash.hh, breaking two OpenROAD callers.

Changes

  • src/est/include/est/EstimateParasitics.h:47 — NetHash::operator() now uses std::hash<const sta::Net*>()(net) instead of removed hashPtr(net).
  • src/rsz/include/rsz/Resizer.hh:88 — same fix in rsz::NetHash::operator().
  • Added comment at both sites noting pointer hashing is nondeterministic across runs; future migration to Network::id(net) recommended when a Network handle is in scope.

Notes

  • std::hash available via already-included <unordered_set> / <unordered_map>.
  • Behavior preserved: same pointer-based hash, same nondeterminism characteristics as previous macro.
  • No functional change to parasitics estimation or resizer logic.

Associated OpenSTA PR: The-OpenROAD-Project/OpenSTA#367

Type of Change

  • Breaking change

Impact

Hopeffully none

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

[Link issues here]

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@dsengupta0628 dsengupta0628 self-assigned this May 28, 2026

@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 replaces the custom hashPtr with std::hash in NetHash within EstimateParasitics.h and Resizer.hh to address nondeterministic pointer hashing, and updates the src/sta subproject. The review feedback suggests explicitly including the <functional> header in both modified files to prevent potential compilation failures across different compilers that may not transitively include it.

// Network::id(net) when a Network handle is available here.
size_t operator()(const sta::Net* net) const
{
return std::hash<const sta::Net*>()(net);

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.

medium

Please ensure that is explicitly included at the top of this file. std::hash is defined in , and relying on transitive includes from other headers (such as <unordered_set>) can lead to build breaks on different compilers or standard library implementations (e.g., Clang/libc++ vs. GCC/libstdc++).

// Network::id(net) when a Network handle is available here.
size_t operator()(const sta::Net* net) const
{
return std::hash<const sta::Net*>()(net);

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.

medium

Please ensure that is explicitly included at the top of this file. std::hash is defined in , and relying on transitive includes from other headers can lead to build breaks on different compilers or standard library implementations.

@dsengupta0628

Copy link
Copy Markdown
Contributor Author

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@dsengupta0628 dsengupta0628 marked this pull request as ready for review May 29, 2026 16:00
@dsengupta0628 dsengupta0628 requested review from a team as code owners May 29, 2026 16:00
@maliberty maliberty merged commit e98fb4f into The-OpenROAD-Project:master May 30, 2026
16 checks passed
@maliberty maliberty deleted the or_update_sta_latest_0528 branch May 30, 2026 15:07
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