-
Notifications
You must be signed in to change notification settings - Fork 566
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: nodes structure refactoring and elimination of getFlatIdx #5903
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
…nction Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
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]>
clang-tidy review says "All clean, LGTM! 👍" |
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.
I think it is cleaner to go with one of those 2 choices:
- use vector of unique pointers and reference the objects by their pointers.
- the current vector of object but reference by index or object reference.
/*either {pin_idx, acc_point_idx} or {inst_idx, acc_pattern_idx} depending on | ||
* context*/ | ||
std::pair<int, int> idx_ = {-1, -1}; | ||
FlexDPNode* prev_node_ = nullptr; |
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.
store prev_node_idx_ instead of pointer to FlexDPNode. safer to avoid memory reallocation causing dangling pointers. (or use vector<vector<unique_ptr>>)
This PR has a secure CI associated with it, is branched from #5901 and is waiting for it to merge.
Nodes structure change
The
nodes
vector has been refactored to be a vector of vectors index by the old "nested id". This allowed for the elimination of thegetFlatIdx()
function, as now the indexing for nodes is always done through both idx.This change impacts various parts of the code as the structure is present in most of the functions that work with Access Patterns.
getEdgeCost refactoring
This PR also contains some minor refactoring on getEdgeCost (both implementations).
The refactoring that does not have to do with the nodes restructuring are:
Do not try to look at changes, it currently has 4 PRs worth of contents, I just want to make it to organize myself and see the public CI.