remove deprecated system .h includes

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2023-06-15 08:59:56 -07:00
parent 257a4fd9ae
commit 44159bbb53
46 changed files with 77 additions and 98 deletions

View File

@ -17,7 +17,7 @@
#include "StaMain.hh"
#include <tcl.h>
#include <stdlib.h>
#include <cstdlib>
#include <sys/stat.h>
#include "Machine.hh"

View File

@ -20,7 +20,7 @@
#include "ArnoldiDelayCalc.hh"
#include <stdio.h>
#include <cstdio>
#include <cmath> // abs
#include "Report.hh"

View File

@ -20,11 +20,6 @@
#include "ArnoldiReduce.hh"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include "Debug.hh"
#include "MinMax.hh"
#include "Sdc.hh"

View File

@ -17,6 +17,7 @@
#pragma once
#include <string>
#include "MinMax.hh"
#include "LibertyClass.hh"
#include "NetworkClass.hh"

View File

@ -16,7 +16,7 @@
#pragma once
#include <string.h> // memcpy
#include <cstring> // memcpy
#include <vector>
#include "ObjectId.hh"

View File

@ -16,7 +16,8 @@
#pragma once
#include <stdarg.h>
#include <cstdarg>
#include "Map.hh"
#include "StringUtil.hh"

View File

@ -16,6 +16,8 @@
#pragma once
#include <limits>
#include "ObjectId.hh"
#include "Set.hh"
#include "Vector.hh"
@ -45,6 +47,8 @@ typedef int DcalcAPIndex;
typedef int TagGroupIndex;
typedef Vector<GraphLoop*> GraphLoopSeq;
static constexpr int level_max = std::numeric_limits<Level>::max();
// 16,777,215 tags
static const int tag_group_index_bits = 24;
static const TagGroupIndex tag_group_index_max = (1<<tag_group_index_bits)-1;

View File

@ -17,6 +17,7 @@
#pragma once
#include <string>
#include "GraphClass.hh"
#include "DcalcAnalysisPt.hh"
#include "StaState.hh"

View File

@ -64,7 +64,7 @@
#define vsnprint vsnprintf
#endif
#include <stddef.h> // size_t
#include <cstddef> // size_t
namespace sta {

View File

@ -17,6 +17,7 @@
#pragma once
#include <cstdint>
#include "Set.hh"
#include "Vector.hh"
#include "Iterator.hh"

View File

@ -17,6 +17,7 @@
#pragma once
#include <complex>
#include "StaState.hh"
#include "LibertyClass.hh"
#include "NetworkClass.hh"

View File

@ -17,6 +17,7 @@
#pragma once
#include <string>
#include "Error.hh"
// Don't require all of tcl.h.

View File

@ -17,9 +17,10 @@
#pragma once
#include <stdio.h>
#include <stdarg.h>
#include <cstdarg>
#include <string>
#include <mutex>
#include "Machine.hh" // __attribute__
struct Tcl_Interp;

View File

@ -17,6 +17,7 @@
#pragma once
#include <tcl.h>
#include "Report.hh"
namespace sta {

View File

@ -17,8 +17,6 @@
#pragma once
#include <set>
#include <math.h>
#include <algorithm>
namespace sta {
@ -70,12 +68,9 @@ public:
this->clear();
}
static bool
intersects(const std::set<KEY, CMP> &set1,
const std::set<KEY, CMP> &set2);
static bool
intersects(const std::set<KEY, CMP> *set1,
const std::set<KEY, CMP> *set2);
const std::set<KEY, CMP> *set2);
// Java style container itererator
// Set::Iterator<Key*> iter(set);
@ -172,47 +167,23 @@ Set<KEY, CMP>::isSubset(const std::set<KEY, CMP> *set2)
}
}
template <class KEY, class CMP>
bool
Set<KEY, CMP>::intersects(const std::set<KEY, CMP> &set1,
const std::set<KEY, CMP> &set2)
{
return intersects(&set1, &set2);
}
template <class KEY, class CMP>
bool
Set<KEY, CMP>::intersects(const std::set<KEY, CMP> *set1,
const std::set<KEY, CMP> *set2)
const std::set<KEY, CMP> *set2)
{
if (set1 && !set1->empty()
&& set2 && !set2->empty()) {
const std::set<KEY, CMP> *small = set1;
const std::set<KEY, CMP> *big = set2;
if (small->size() > big->size()) {
small = set2;
big = set1;
}
auto iter1 = big->begin();
auto last1 = big->end();
auto iter2 = small->begin();
auto last2 = small->end();
if (static_cast<float>(small->size() + big->size()) < (small->size() * log(static_cast<float>(big->size())))) {
while (iter1 != last1 && iter2 != last2) {
if (*iter1 < *iter2)
++iter1;
else if (*iter2 < *iter1)
++iter2;
else
return true;
}
}
else {
for (/* empty */; iter2 != last2; ++iter2) {
const KEY key2 = *iter2;
if (big->find(key2) != last1)
return true;
}
if (set2->size() > set1->size())
std::swap(set1, set2);
auto end1 = set1->end();
auto iter2 = set2->begin();
auto end2 = set2->end();
while (iter2 != end2) {
const KEY key2 = *iter2;
if (set1->find(key2) != end1)
return true;
iter2++;
}
}
return false;

View File

@ -16,7 +16,7 @@
#pragma once
#include <stddef.h> // size_t
#include <cstddef> // size_t
namespace sta {

View File

@ -16,9 +16,10 @@
#pragma once
#include <stdarg.h>
#include <string.h>
#include <cstdarg>
#include <cstring>
#include <string>
#include "Machine.hh" // __attribute__
#include "Vector.hh"

View File

@ -17,6 +17,7 @@
#pragma once
#include <string>
#include "Delay.hh"
#include "LibertyClass.hh"

View File

@ -18,6 +18,7 @@
#include <array>
#include <vector>
#include "Iterator.hh"
#include "Map.hh"
#include "StringUtil.hh"

View File

@ -27,7 +27,7 @@
#else // ZLIB_FOUND
#include <stdio.h>
#include <cstdio>
#define gzFile FILE*
#define gzopen fopen

View File

@ -15,8 +15,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <stdlib.h>
#include <string.h>
#include <cstdlib>
#include <cstring>
#include "StringUtil.hh"
#include "liberty/LibertyParser.hh"

View File

@ -16,8 +16,8 @@
#include "LibertyParser.hh"
#include <stdio.h>
#include <string.h>
#include <cstdio>
#include <cstring>
#include "Report.hh"
#include "Error.hh"

View File

@ -16,8 +16,8 @@
#include "LibertyReader.hh"
#include <ctype.h>
#include <stdlib.h>
#include <cctype>
#include <cstdlib>
#include "Report.hh"
#include "Debug.hh"

View File

@ -16,7 +16,7 @@
#include "LibertyWriter.hh"
#include <stdlib.h>
#include <cstdlib>
#include <algorithm>
#include "Units.hh"

View File

@ -16,7 +16,7 @@
#include "ConcreteLibrary.hh"
#include <stdlib.h>
#include <cstdlib>
#include "PatternMatch.hh"
#include "PortDirection.hh"

View File

@ -16,7 +16,7 @@
#include "HpinDrvrLoad.hh"
#include <stdio.h>
#include <cstdio>
#include "Network.hh"

View File

@ -16,8 +16,8 @@
#include "ParseBus.hh"
#include <string.h>
#include <stdlib.h>
#include <cstring>
#include <cstdlib>
#include <string>
#include "StringUtil.hh"

View File

@ -16,7 +16,7 @@
#include "VerilogNamespace.hh"
#include <ctype.h>
#include <cctype>
#include "StringUtil.hh"
#include "ParseBus.hh"

View File

@ -16,8 +16,8 @@
#include "SpefNamespace.hh"
#include <ctype.h>
#include <string.h>
#include <cctype>
#include <cstring>
namespace sta {

View File

@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <string.h>
#include <cstring>
#include "StringUtil.hh"
#include "StringSeq.hh"

View File

@ -16,9 +16,9 @@
#include "WriteSdc.hh"
#include <stdio.h>
#include <cstdio>
#include <algorithm>
#include <time.h>
#include <ctime>
#include "Zlib.hh"
#include "Report.hh"

View File

@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <ctype.h>
#include <cctype>
#include "sdf/SdfReaderPvt.hh"

View File

@ -16,8 +16,8 @@
#include "sdf/SdfReader.hh"
#include <stdarg.h>
#include <ctype.h>
#include <cstdarg>
#include <cctype>
#include "Error.hh"
#include "Debug.hh"

View File

@ -16,8 +16,8 @@
#include "sdf/SdfWriter.hh"
#include <stdio.h>
#include <time.h>
#include <cstdio>
#include <ctime>
#include "Zlib.hh"
#include "StaConfig.hh" // STA_VERSION

View File

@ -16,8 +16,6 @@
#include "Bfs.hh"
#include <limits.h>
#include "Report.hh"
#include "Debug.hh"
#include "Mutex.hh"
@ -323,7 +321,7 @@ BfsIterator::remove(Vertex *vertex)
BfsFwdIterator::BfsFwdIterator(BfsIndex bfs_index,
SearchPred *search_pred,
StaState *sta) :
BfsIterator(bfs_index, 0, INT_MAX, search_pred, sta)
BfsIterator(bfs_index, 0, level_max, search_pred, sta)
{
}
@ -377,7 +375,7 @@ BfsFwdIterator::enqueueAdjacentVertices(Vertex *vertex,
BfsBkwdIterator::BfsBkwdIterator(BfsIndex bfs_index,
SearchPred *search_pred,
StaState *sta) :
BfsIterator(bfs_index, INT_MAX, 0, search_pred, sta)
BfsIterator(bfs_index, level_max, 0, search_pred, sta)
{
}

View File

@ -402,7 +402,7 @@ CheckCrpr::crprPossible(const Clock *clk1,
|| clk1->isGenerated()
|| clk2->isGenerated()
// Different non-generated clocks with the same source pins (using -add).
|| PinSet::intersects(clk1->pins(), clk2->pins()));
|| PinSet::intersects(&clk1->pins(), &clk2->pins()));
}
} // namespace

View File

@ -16,8 +16,8 @@
#include "Error.hh"
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <cstdio>
#include "StringUtil.hh"

View File

@ -16,7 +16,7 @@
#include "Hash.hh"
#include <string.h>
#include <cstring>
namespace sta {

View File

@ -15,7 +15,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "PatternMatch.hh"
#include <string.h>
#include <cstring>
#include <tcl.h>
namespace sta {

View File

@ -16,8 +16,8 @@
#include "ReportStd.hh"
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <cstdio>
#include "Report.hh"

View File

@ -16,8 +16,8 @@
#include "ReportTcl.hh"
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
namespace sta {

View File

@ -17,8 +17,8 @@
#include "StringUtil.hh"
#include <limits>
#include <ctype.h>
#include <stdio.h>
#include <cctype>
#include <cstdio>
#include "Machine.hh"
#include "Mutex.hh"

View File

@ -16,8 +16,8 @@
#include "TokenParser.hh"
#include <ctype.h>
#include <string.h>
#include <cctype>
#include <cstring>
namespace sta {

View File

@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <stdlib.h>
#include <cstdlib>
#include "PortDirection.hh"
#include "verilog/VerilogReaderPvt.hh"

View File

@ -16,7 +16,7 @@
#include "VerilogReader.hh"
#include <stdlib.h>
#include <cstdlib>
#include "Debug.hh"
#include "Report.hh"

View File

@ -16,7 +16,7 @@
#include "VerilogWriter.hh"
#include <stdlib.h>
#include <cstdlib>
#include <algorithm>
#include "Error.hh"