Skip to content

Revert "Undo the pad changes and save them for later"#10314

Open
openroad-ci wants to merge 3 commits intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:bzl-rdl
Open

Revert "Undo the pad changes and save them for later"#10314
openroad-ci wants to merge 3 commits intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:bzl-rdl

Conversation

@openroad-ci
Copy link
Copy Markdown
Collaborator

This reverts commit d7e11c6.

Summary

Make rdl more deterministic

Type of Change

  • Bug fix

Impact

Makes the tests pass in bazel and cmake

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 included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

[Link issues here]

This reverts commit d7e11c6.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Copy link
Copy Markdown
Contributor

@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 improves the stability and determinism of the RDL router by incorporating lexicographical comparisons (names and IDs) into sorting logic and map keys. It also introduces a tie-breaking direction bias in edge weight calculations. Review feedback focuses on performance optimizations, specifically recommending the use of std::string_view instead of std::string to avoid unnecessary heap allocations during frequent comparisons. Additionally, it is suggested to replace a hardcoded magic number in the edge weight logic with a named constant and provide a clarifying comment regarding the heuristic rationale.

Comment thread src/pad/src/RDLRoute.cpp
Comment thread src/pad/src/RDLRoute.cpp Outdated
Comment thread src/pad/src/RDLRoute.cpp Outdated
Comment thread src/pad/src/RDLRouter.cpp
Comment thread src/pad/src/RDLRouter.cpp
Comment thread src/pad/src/RDLRouter.cpp
Comment thread src/pad/src/RDLRouter.h Outdated
Comment thread src/pad/src/RDLRouter.h Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

clang-tidy review says "All clean, LGTM! 👍"

maliberty added 2 commits May 2, 2026 03:21
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
dbITerm::getName() returns std::string by value (constructed on the
fly), so binding the result to std::string_view leaves the view
aliasing a destroyed temporary at the next statement. Switch the two
sort/compare sites in RDLRoute to const std::string& -- lifetime
extension of the temporary keeps the reference valid -- and apply the
same const-ref form to the DbNetPtrLess / DbITermPtrLess comparators in
RDLRouter.h to avoid an unnecessary copy. Drop the now-unused <map>
include from RDLRoute.h and the <string_view>/<tuple> includes from
RDLRoute.cpp.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

clang-tidy review says "All clean, LGTM! 👍"

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