Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: prelim cutset based remap #5597

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

openroad-robot
Copy link
Contributor

No description provided.

Copy link
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

There were too many comments to post at once. Showing the first 25 out of 127. Check the log or trigger a new build to see more.

int var_count_;
};

}
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: namespace 'sta' not terminated with a closing comment [google-readability-namespace-comments]

Suggested change
}
} // namespace sta
Additional context

src/rmp/include/rmp/FuncExpr2Kit.h:7: namespace 'sta' starts here

namespace sta {
          ^

logger_(logger),
sta_nwk_(nwk),
cut_(cut),
cut_name_(cut_name){}
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: parameter 'cut_name' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]

src/rmp/include/rmp/Restructure.h:39:

+ #include <utility>
Suggested change
cut_name_(cut_name){}
cut_name_(std::move(cut_name)){}

@@ -96,6 +270,49 @@
void setTieLoPort(sta::LibertyPort* loport);
void setTieHiPort(sta::LibertyPort* hiport);

//Cut based resynthesis methods

void cutresynthrun(char* liberty_file_name,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'rmp::Restructure::cutresynthrun' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]

  void cutresynthrun(char* liberty_file_name,
       ^
Additional context

src/rmp/src/Restructure.cpp:696: the definition seen here

void Restructure::cutresynthrun(
                  ^

src/rmp/include/rmp/Restructure.h:274: differing parameters are named here: ('liberty_file_name'), in definition: ('target_library')

  void cutresynthrun(char* liberty_file_name,
       ^

*/
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: inclusion of deprecated C++ header 'time.h'; consider using 'ctime' instead [modernize-deprecated-headers]

Suggested change
#include <time.h>
#include <ctime>

#include "sta/Network.hh"
#include "sta/PathEnd.hh"
#include "sta/PathExpanded.hh"
#include "sta/PathRef.hh"
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: duplicate include [readability-duplicate-include]

src/rmp/src/Cut.cpp:31:

- #include "sta/PathExpanded.hh"
- #include "sta/PathRef.hh"
+ #include "sta/PathExpanded.hh"

// the logic) but does lead to net -> net connections.

for (auto cur_inst : cut_->volume_) {
Abc_Obj_t* cur_gate = CreateGate(cur_inst);
Copy link
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 'cur_gate' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

    Abc_Obj_t* cur_gate = CreateGate(cur_inst);
               ^
Additional context

src/rmp/src/Cut2Ntk.cpp:94: Value stored to 'cur_gate' during its initialization is never read

    Abc_Obj_t* cur_gate = CreateGate(cur_inst);
               ^

// the logic) but does lead to net -> net connections.

for (auto cur_inst : cut_->volume_) {
Abc_Obj_t* cur_gate = CreateGate(cur_inst);
Copy link
Contributor

Choose a reason for hiding this comment

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

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

    Abc_Obj_t* cur_gate = CreateGate(cur_inst);
               ^

Abc_Obj_t* Cut2Ntk::CreateGate(const sta::Instance* cur_inst)
{
Abc_Obj_t* ret = nullptr;
static int debug;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'debug' set but not used [clang-diagnostic-unused-but-set-variable]

  static int debug;
             ^

} else {
Abc_Obj_t* ip_net = Abc_NtkCreateNet(abc_nwk_);
Abc_ObjAssignName(
ip_net, (char*) (sta_nwk_->pathName(cur_pin)), NULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: use nullptr [modernize-use-nullptr]

Suggested change
ip_net, (char*) (sta_nwk_->pathName(cur_pin)), NULL);
ip_net, (char*) (sta_nwk_->pathName(cur_pin)), nullptr);

// Get the kit representation
int var_count = 0;
/*word32*/ unsigned* kit_tables;
sta::FuncExpr2Kit(lp->function(), var_count, kit_tables);
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii]

Suggested change
sta::FuncExpr2Kit(lp->function(), var_count, kit_tables);
sta::FuncExpr2Kit give_me_a_name(lp->function(), var_count, kit_tables);

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.

3 participants