-
Notifications
You must be signed in to change notification settings - Fork 23
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
✨ Remove dangling PIs and redundant POs during network parsing #321
✨ Remove dangling PIs and redundant POs during network parsing #321
Conversation
Co-authored-by: Marcel Walter <[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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #321 +/- ##
==========================================
- Coverage 96.06% 95.99% -0.07%
==========================================
Files 102 100 -2
Lines 10086 9966 -120
==========================================
- Hits 9689 9567 -122
- Misses 397 399 +2
... and 19 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
clang-tidy review says "All clean, LGTM! 👍" |
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.
clang-tidy made some suggestions
experiments/post_layout_optimization/post_layout_optimization.cpp
Outdated
Show resolved
Hide resolved
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 auto nets = reader.get_networks(); | ||
const auto tec_net = *nets.front(); | ||
|
||
return tec_net; |
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: constness of 'tec_net' prevents automatic move [performance-no-automatic-move]
return tec_net;
^
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
"equivalent"}; | ||
|
||
fiction::orthogonal_physical_design_stats orthogonal_stats{}; | ||
fiction::post_layout_optimization_stats optimization_stats{}; |
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: variable 'optimization_stats' of type 'fiction::post_layout_optimization_stats' can be declared 'const' [misc-const-correctness]
fiction::post_layout_optimization_stats optimization_stats{}; | |
fiction::post_layout_optimization_stats const optimization_stats{}; |
"equivalent"}; | ||
|
||
fiction::orthogonal_physical_design_stats orthogonal_stats{}; | ||
fiction::post_layout_optimization_stats optimization_stats{}; |
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: unused variable 'optimization_stats' [clang-diagnostic-unused-variable]
fiction::post_layout_optimization_stats optimization_stats{};
^
std::vector<mockturtle::gate> gates{}; | ||
|
||
// parameters for technology mapping | ||
mockturtle::map_params map_params{}; |
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: variable 'map_params' of type 'mockturtle::map_params' can be declared 'const' [misc-const-correctness]
mockturtle::map_params map_params{}; | |
mockturtle::map_params const map_params{}; |
// parameters for technology mapping | ||
mockturtle::map_params map_params{}; | ||
|
||
const auto read_genlib_result = lorina::read_genlib(library_stream, mockturtle::genlib_reader{gates}); |
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: Value stored to 'read_genlib_result' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
const auto read_genlib_result = lorina::read_genlib(library_stream, mockturtle::genlib_reader{gates});
^
Additional context
experiments/mnt_bench/ortho_layouts_row.cpp:89: Value stored to 'read_genlib_result' during its initialization is never read
const auto read_genlib_result = lorina::read_genlib(library_stream, mockturtle::genlib_reader{gates});
^
// parameters for technology mapping | ||
mockturtle::map_params map_params{}; | ||
|
||
const auto read_genlib_result = lorina::read_genlib(library_stream, mockturtle::genlib_reader{gates}); |
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: unused variable 'read_genlib_result' [clang-diagnostic-unused-variable]
const auto read_genlib_result = lorina::read_genlib(library_stream, mockturtle::genlib_reader{gates});
^
|
||
fiction::orthogonal_physical_design_stats orthogonal_stats{}; | ||
fiction::hexagonalization_stats hexagonalization_stats{}; | ||
fiction::post_layout_optimization_stats optimization_stats{}; |
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: variable 'optimization_stats' of type 'fiction::post_layout_optimization_stats' can be declared 'const' [misc-const-correctness]
fiction::post_layout_optimization_stats optimization_stats{}; | |
fiction::post_layout_optimization_stats const optimization_stats{}; |
|
||
fiction::orthogonal_physical_design_stats orthogonal_stats{}; | ||
fiction::hexagonalization_stats hexagonalization_stats{}; | ||
fiction::post_layout_optimization_stats optimization_stats{}; |
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: unused variable 'optimization_stats' [clang-diagnostic-unused-variable]
fiction::post_layout_optimization_stats optimization_stats{};
^
// rewrite network cuts using the given re-synthesis function | ||
const auto cut_net = mockturtle::cut_rewriting(net, resynthesis_function, cut_params); | ||
// compute depth | ||
mockturtle::depth_view depth_cut_net{cut_net}; |
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: variable 'depth_cut_net' of type 'mockturtle::depth_view<names_view<technology_network>>' (aka 'depth_view<mockturtle::names_viewfiction::technology_network>') can be declared 'const' [misc-const-correctness]
mockturtle::depth_view depth_cut_net{cut_net}; | |
mockturtle::depth_view const depth_cut_net{cut_net}; |
fiction::restore_names(net, mapped_network); | ||
|
||
// compute depth | ||
mockturtle::depth_view depth_mapped_network{mapped_network}; |
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: variable 'depth_mapped_network' of type 'mockturtle::depth_view<names_view<technology_network>>' (aka 'depth_view<mockturtle::names_viewfiction::technology_network>') can be declared 'const' [misc-const-correctness]
mockturtle::depth_view depth_mapped_network{mapped_network}; | |
mockturtle::depth_view const depth_mapped_network{mapped_network}; |
fiction::write_fgl_layout(gate_level_layout, fmt::format("{}/{}_Bestagon_ROW_ortho_UnOpt_UnOrd.fgl", layouts_folder, benchmark)); | ||
|
||
// check equivalence | ||
fiction::equivalence_checking_stats eq_stats{}; |
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: variable 'eq_stats' of type 'fiction::equivalence_checking_stats' can be declared 'const' [misc-const-correctness]
fiction::equivalence_checking_stats eq_stats{}; | |
fiction::equivalence_checking_stats const eq_stats{}; |
Description
Remove dangling PIs and redundant POs during network conversion.
Checklist: