Skip to content

Resizer#3045

Closed
openroadie wants to merge 19 commits intoThe-OpenROAD-Project:masterfrom
openroadie:resizer
Closed

Resizer#3045
openroadie wants to merge 19 commits intoThe-OpenROAD-Project:masterfrom
openroadie:resizer

Conversation

@openroadie
Copy link
Copy Markdown
Contributor

No description provided.

openroadie and others added 19 commits February 28, 2023 22:08
Signed-off-by: Harsh Vardhan <openroad@chez-vardhan.com>
Signed-off-by: Harsh Vardhan <openroad@chez-vardhan.com>
Signed-off-by: Harsh Vardhan <openroad@chez-vardhan.com>
Signed-off-by: Harsh Vardhan <openroad@chez-vardhan.com>
Signed-off-by: Harsh Vardhan <openroad@chez-vardhan.com>
…Vt swaps)

Signed-off-by: Harsh Vardhan <openroad@chez-vardhan.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

int start_index = expanded->startIndex();
for (int i = start_index; i < path_length; i++) {
PathRef* path = expanded->path(i);
Vertex* path_vertex = path->vertex(sta_);
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.

warning: Value stored to 'path_vertex' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

      Vertex* path_vertex = path->vertex(sta_);
              ^

src/rsz/src/RepairSetup.cc:402: Value stored to 'path_vertex' during its initialization is never read

      Vertex* path_vertex = path->vertex(sta_);
              ^

int start_index = expanded->startIndex();
for (int i = start_index; i < path_length; i++) {
PathRef* path = expanded->path(i);
Vertex* path_vertex = path->vertex(sta_);
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.

warning: unused variable 'path_vertex' [clang-diagnostic-unused-variable]

      Vertex* path_vertex = path->vertex(sta_);
              ^

if (i > 0 && network_->isDriver(path_pin)
&& !network_->isTopLevelPort(path_pin)) {
TimingArc* prev_arc = expanded->prevArc(i);
Edge* prev_edge = path->prevEdge(prev_arc, sta_);
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.

warning: Value stored to 'prev_edge' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

        Edge* prev_edge = path->prevEdge(prev_arc, sta_);
              ^

src/rsz/src/RepairSetup.cc:407: Value stored to 'prev_edge' during its initialization is never read

        Edge* prev_edge = path->prevEdge(prev_arc, sta_);
              ^

if (i > 0 && network_->isDriver(path_pin)
&& !network_->isTopLevelPort(path_pin)) {
TimingArc* prev_arc = expanded->prevArc(i);
Edge* prev_edge = path->prevEdge(prev_arc, sta_);
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.

warning: unused variable 'prev_edge' [clang-diagnostic-unused-variable]

        Edge* prev_edge = path->prevEdge(prev_arc, sta_);
              ^


// Check if we have already dealt with this instance. Skip if the answer
// is a yes.
if (instance_set.find(drvr) == instance_set.end())
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.

warning: statement should be inside braces [google-readability-braces-around-statements]

Suggested change
if (instance_set.find(drvr) == instance_set.end())
if (instance_set.find(drvr) == instance_set.end()) {

src/rsz/src/RepairSetup.cc:446:

-     else
+     } else

Comment thread src/rsz/src/Resizer.cc
if (pin1 != nullptr && pin2 != nullptr) {
// Swap the ports and nets
sta_->disconnectPin(found_pin1);
sta_->connectPin(inst, port1, net2);
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.

warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]

    sta_->connectPin(inst, port1, net2);
    ^

src/rsz/src/Resizer.cc:876: 'port1' declared without an initial value

  LibertyPort *port1, *port2;
               ^

src/rsz/src/Resizer.cc:885: Loop condition is false. Execution continues on line 902

  while (pin_iter->hasNext()) {
  ^

src/rsz/src/Resizer.cc:901: Assuming the condition is true

  if (pin1 != nullptr && pin2 != nullptr) {
      ^

src/rsz/src/Resizer.cc:901: Left side of '&&' is true

  if (pin1 != nullptr && pin2 != nullptr) {
      ^

src/rsz/src/Resizer.cc:901: Assuming the condition is true

  if (pin1 != nullptr && pin2 != nullptr) {
                         ^

src/rsz/src/Resizer.cc:901: Taking true branch

  if (pin1 != nullptr && pin2 != nullptr) {
  ^

src/rsz/src/Resizer.cc:904: 2nd function call argument is an uninitialized value

    sta_->connectPin(inst, port1, net2);
    ^

Comment thread src/rsz/src/Resizer.cc
sta_->disconnectPin(found_pin1);
sta_->connectPin(inst, port1, net2);
sta_->disconnectPin(found_pin2);
sta_->connectPin(inst, port2, net1);
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.

warning: 2nd function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]

    sta_->connectPin(inst, port2, net1);
    ^

src/rsz/src/Resizer.cc:876: 'port2' declared without an initial value

  LibertyPort *port1, *port2;
                       ^

src/rsz/src/Resizer.cc:885: Loop condition is true. Entering loop body

  while (pin_iter->hasNext()) {
  ^

src/rsz/src/Resizer.cc:889: Assuming 'port' is equal to 'pin1'

    if (port == pin1) {
        ^

src/rsz/src/Resizer.cc:889: Taking true branch

    if (port == pin1) {
    ^

src/rsz/src/Resizer.cc:894: Assuming 'port' is not equal to 'pin2'

    if (port == pin2) {
        ^

src/rsz/src/Resizer.cc:894: Taking false branch

    if (port == pin2) {
    ^

src/rsz/src/Resizer.cc:885: Loop condition is false. Execution continues on line 902

  while (pin_iter->hasNext()) {
  ^

src/rsz/src/Resizer.cc:901: Assuming the condition is true

  if (pin1 != nullptr && pin2 != nullptr) {
      ^

src/rsz/src/Resizer.cc:901: Left side of '&&' is true

  if (pin1 != nullptr && pin2 != nullptr) {
      ^

src/rsz/src/Resizer.cc:901: Assuming the condition is true

  if (pin1 != nullptr && pin2 != nullptr) {
                         ^

src/rsz/src/Resizer.cc:901: Taking true branch

  if (pin1 != nullptr && pin2 != nullptr) {
  ^

src/rsz/src/Resizer.cc:906: 2nd function call argument is an uninitialized value

    sta_->connectPin(inst, port2, net1);
    ^

Comment thread src/rsz/src/Resizer.cc
Comment on lines +921 to +922
if (net && !port->direction()->isAnyTristate())
parasiticsInvalid(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.

warning: statement should be inside braces [google-readability-braces-around-statements]

Suggested change
if (net && !port->direction()->isAnyTristate())
parasiticsInvalid(net);
if (net && !port->direction()->isAnyTristate()) {
parasiticsInvalid(net);
}

Comment thread src/rsz/src/Resizer.cc
auto port_iter = sta::LibertyCellPortIterator(cell);
while (port_iter.hasNext()) {
LibertyPort *port = port_iter.next();
if (!input_port->equiv(input_port, port) &&
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.

warning: static member accessed through instance [readability-static-accessed-through-instance]

Suggested change
if (!input_port->equiv(input_port, port) &&
if (!sta::LibertyPort::equiv(input_port, port) &&

Comment thread src/rsz/src/Resizer.cc
while (port_iter.hasNext()) {
LibertyPort *port = port_iter.next();
if (!input_port->equiv(input_port, port) &&
!drvr_port->equiv(drvr_port, port) &&
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.

warning: static member accessed through instance [readability-static-accessed-through-instance]

Suggested change
!drvr_port->equiv(drvr_port, port) &&
!sta::LibertyPort::equiv(drvr_port, port) &&

@openroadie openroadie closed this Mar 20, 2023
@openroadie openroadie deleted the resizer branch March 20, 2023 07:15
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.

1 participant