-
Notifications
You must be signed in to change notification settings - Fork 536
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
drt: genPatterns_commit refactoring #5872
base: master
Are you sure you want to change the base?
drt: genPatterns_commit refactoring #5872
Conversation
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
2ebcfdb
to
91a9156
Compare
clang-tidy review says "All clean, LGTM! 👍" |
…nction Signed-off-by: bernardo <[email protected]>
There was a problem hiding this 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
const std::vector<FlexDPNode>& nodes, | ||
const std::vector<std::pair<frMPin*, frInstTerm*>>& pins, | ||
std::set<std::pair<int, int>>& used_access_points, | ||
const int max_access_point_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: parameter 'max_access_point_size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
const int max_access_point_size); | |
int max_access_point_size); |
This is branched from #5862 and is waiting for it to merge.
Some refactoring on
genPatterns_commit
is being done to improve readability and reduce code.Access Patterns Graph Backwards Path Function and Readability
The first part of
genPatterns_commit
is a loop that traces a path through access points of an instance that represent a chosen access pattern.Right now the loop is a little over complicated for what it does, so I refactored it a bit to make more obvious.
Added the variables
source_node_idx
anddrain_node_idx
to make the start and end points of the path search more clear, instead decreasingpin_cnt
.This was transformed in a function called
extractAccessPatternFromNodes
as it has a pretty distinct role and function.Used Pattern Guard
The later part of the had an if statement to check is the generated pattern was unused, if true it did more checks, later it essentially had an else with
return false
. This as transformed into a guard.No further changes on this function will be done in this PR as the git diff shows everything past the guard as changed due to the indentation level change. Further changes will be at a separate PR.