CUT: wrap mio_library_ with unique_ptr#8670
CUT: wrap mio_library_ with unique_ptr#8670maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
Conversation
|
clang-tidy review says "All clean, LGTM! 👍" |
Head branch was pushed to by a user without write access
| @@ -6,6 +6,7 @@ | |||
| #include <string.h> | |||
|
|
|||
| #include <cmath> | |||
| #include <iostream> | |||
| #include <optional> | |||
There was a problem hiding this comment.
warning: included header iostream is not used directly [misc-include-cleaner]
| #include <optional> | |
| #include <optional> |
src/cut/src/abc_library_factory.cpp
Outdated
| abc::Vec_Flt_t* axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size()); | ||
| abc::Vec_Int_t* axis_1_abc_int_vec | ||
| = abc::Vec_IntAlloc(axis1_values->size()); | ||
| abc::Vec_Flt_t *axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size()); |
There was a problem hiding this comment.
warning: no header providing "abc::Vec_FltAlloc" is directly included [misc-include-cleaner]
abc::Vec_Flt_t *axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size());
^
src/cut/src/abc_library_factory.cpp
Outdated
| abc::Vec_Flt_t* axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size()); | ||
| abc::Vec_Int_t* axis_1_abc_int_vec | ||
| = abc::Vec_IntAlloc(axis1_values->size()); | ||
| abc::Vec_Flt_t *axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size()); |
There was a problem hiding this comment.
warning: no header providing "abc::Vec_Flt_t" is directly included [misc-include-cleaner]
abc::Vec_Flt_t *axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size());
^
src/cut/src/abc_library_factory.cpp
Outdated
| abc::Vec_Int_t* axis_1_abc_int_vec | ||
| = abc::Vec_IntAlloc(axis1_values->size()); | ||
| abc::Vec_Flt_t *axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size()); | ||
| abc::Vec_Int_t *axis_1_abc_int_vec = |
There was a problem hiding this comment.
warning: no header providing "abc::Vec_Int_t" is directly included [misc-include-cleaner]
abc::Vec_Int_t *axis_1_abc_int_vec =
^
src/cut/src/abc_library_factory.cpp
Outdated
| = abc::Vec_IntAlloc(axis1_values->size()); | ||
| abc::Vec_Flt_t *axis_1_abc_vec = abc::Vec_FltAlloc(axis1_values->size()); | ||
| abc::Vec_Int_t *axis_1_abc_int_vec = | ||
| abc::Vec_IntAlloc(axis1_values->size()); |
There was a problem hiding this comment.
warning: no header providing "abc::Vec_IntAlloc" is directly included [misc-include-cleaner]
abc::Vec_IntAlloc(axis1_values->size());
^
src/cut/src/abc_library_factory.cpp
Outdated
| } | ||
|
|
||
| // Set standard cell function | ||
| abc::Vec_Wrd_t* vFunc; | ||
| abc::Vec_Wrd_t *vFunc; |
There was a problem hiding this comment.
warning: no header providing "abc::Vec_Wrd_t" is directly included [misc-include-cleaner]
src/cut/src/abc_library_factory.cpp:16:
- #include "rsz/Resizer.hh"
+ #include "misc/vec/vecWrd.h"
+ #include "rsz/Resizer.hh"
src/cut/src/abc_library_factory.cpp
Outdated
| abc::Vec_WrdErase(&output_pin->vFunc); | ||
| vFunc = abc::Mio_ParseFormulaTruth( | ||
| output_pin->func_text, | ||
| (char**) (abc::Vec_PtrArray(input_names_abc)), | ||
| output_pin->func_text, (char **)(abc::Vec_PtrArray(input_names_abc)), |
There was a problem hiding this comment.
warning: no header providing "abc::Vec_PtrArray" is directly included [misc-include-cleaner]
output_pin->func_text, (char **)(abc::Vec_PtrArray(input_names_abc)),
^
src/cut/src/abc_library_factory.cpp
Outdated
| abc::word constant) | ||
| { | ||
| std::pair<abc::SC_Cell*, abc::SC_Pin*> result = {nullptr, nullptr}; | ||
| std::pair<abc::SC_Cell *, abc::SC_Pin *> FindConstantCell(abc::SC_Lib *library, |
There was a problem hiding this comment.
warning: function 'FindConstantCell' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
| std::pair<abc::SC_Cell *, abc::SC_Pin *> FindConstantCell(abc::SC_Lib *library, | |
| static std::pair<abc::SC_Cell *, abc::SC_Pin *> FindConstantCell(abc::SC_Lib *library, |
src/cut/src/abc_library_factory.cpp
Outdated
| return IsConst1Cell(cell_name) || IsConst0Cell(cell_name); | ||
| } | ||
|
|
||
| static bool abc_initialized = false; | ||
|
|
||
| void abcInit() | ||
| { | ||
| void abcInit() { |
There was a problem hiding this comment.
warning: function 'abcInit' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
| void abcInit() { | |
| static void abcInit() { |
src/cut/src/abc_library_factory.cpp
Outdated
| if (!abc_initialized) { | ||
| abc::Abc_Start(); | ||
| abc_initialized = true; | ||
| } | ||
| } | ||
|
|
||
| void abcStop() | ||
| { | ||
| void abcStop() { |
There was a problem hiding this comment.
warning: function 'abcStop' can be made static or moved into an anonymous namespace to enforce internal linkage [misc-use-internal-linkage]
| void abcStop() { | |
| static void abcStop() { |
|
clang-tidy review says "All clean, LGTM! 👍" |
Release if a user requests it. Then make a new one for future requests. Supress stdout of abc for future constructions. Signed-off-by: Drew Lewis <cannada@google.com>
|
@maliberty when merging upstream master I had signing issues so I basically squashed and repushed. Sorry that you might want to look at the changes again, but at least it's a short PR, the main thing since you approved was to make new copies of the library and suppress the stdout for abc. |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
866219a
into
The-OpenROAD-Project:master
mio_library_ was not being deleted AFAICT.