gcc 9.1.0 warnings
This commit is contained in:
parent
a4df141cbc
commit
b3d8ae3d31
|
|
@ -449,6 +449,13 @@ target_include_directories(OpenSTA
|
||||||
${CUDD_INCLUDE}
|
${CUDD_INCLUDE}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_compile_options(OpenSTA
|
||||||
|
PRIVATE
|
||||||
|
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-security>
|
||||||
|
$<$<CXX_COMPILER_ID:AppleClang>:-Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-security>
|
||||||
|
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-security>
|
||||||
|
)
|
||||||
|
|
||||||
# Disable compiler specific extensions like gnu++11.
|
# Disable compiler specific extensions like gnu++11.
|
||||||
set_target_properties(OpenSTA PROPERTIES CXX_EXTENSIONS OFF)
|
set_target_properties(OpenSTA PROPERTIES CXX_EXTENSIONS OFF)
|
||||||
target_compile_features(OpenSTA PUBLIC cxx_std_11)
|
target_compile_features(OpenSTA PUBLIC cxx_std_11)
|
||||||
|
|
@ -465,13 +472,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${STA_HOME}/app)
|
||||||
# lib name results in "No rule to make target ../depend.
|
# lib name results in "No rule to make target ../depend.
|
||||||
add_executable(sta app/Main.cc)
|
add_executable(sta app/Main.cc)
|
||||||
|
|
||||||
target_compile_options(sta
|
|
||||||
PRIVATE
|
|
||||||
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-security>
|
|
||||||
$<$<CXX_COMPILER_ID:AppleClang>:-Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-security>
|
|
||||||
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-security>
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(sta
|
target_link_libraries(sta
|
||||||
sta_swig
|
sta_swig
|
||||||
OpenSTA
|
OpenSTA
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,12 @@ Delay::Delay() :
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Delay::Delay(const Delay &delay) :
|
||||||
|
mean_(delay.mean_),
|
||||||
|
sigma2_(delay.sigma2_)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Delay::Delay(float mean) :
|
Delay::Delay(float mean) :
|
||||||
mean_(mean),
|
mean_(mean),
|
||||||
sigma2_(0.0)
|
sigma2_(0.0)
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,13 @@ Delay::Delay() :
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Delay::Delay(const Delay &delay) :
|
||||||
|
mean_(delay.mean_)
|
||||||
|
{
|
||||||
|
sigma2_[EarlyLate::earlyIndex()] = delay.sigma2_[EarlyLate::earlyIndex()];
|
||||||
|
sigma2_[EarlyLate::lateIndex()] = delay.sigma2_[EarlyLate::lateIndex()];
|
||||||
|
}
|
||||||
|
|
||||||
Delay::Delay(float mean) :
|
Delay::Delay(float mean) :
|
||||||
mean_(mean),
|
mean_(mean),
|
||||||
sigma2_{0.0, 0.0}
|
sigma2_{0.0, 0.0}
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,12 @@ private:
|
||||||
template <class TYPE>
|
template <class TYPE>
|
||||||
ArrayTable<TYPE>::ArrayTable() :
|
ArrayTable<TYPE>::ArrayTable() :
|
||||||
size_(0),
|
size_(0),
|
||||||
|
free_block_idx_(block_idx_null),
|
||||||
|
free_idx_(object_idx_null),
|
||||||
blocks_size_(0),
|
blocks_size_(0),
|
||||||
blocks_capacity_(1024),
|
blocks_capacity_(1024),
|
||||||
blocks_(new ArrayBlock<TYPE>*[blocks_capacity_]),
|
blocks_(new ArrayBlock<TYPE>*[blocks_capacity_]),
|
||||||
prev_blocks_(nullptr),
|
prev_blocks_(nullptr)
|
||||||
free_block_idx_(block_idx_null),
|
|
||||||
free_idx_(object_idx_null)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@ template <class TYPE>
|
||||||
void
|
void
|
||||||
ArrayTable<TYPE>::deleteBlocks()
|
ArrayTable<TYPE>::deleteBlocks()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < blocks_size_; i++)
|
for (size_t i = 0; i < blocks_size_; i++)
|
||||||
delete blocks_[i];
|
delete blocks_[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ class Delay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Delay();
|
Delay();
|
||||||
|
Delay(const Delay &delay);
|
||||||
Delay(float mean);
|
Delay(float mean);
|
||||||
Delay(float mean,
|
Delay(float mean,
|
||||||
float sigma2);
|
float sigma2);
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ class Delay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Delay();
|
Delay();
|
||||||
|
Delay(const Delay &delay);
|
||||||
Delay(float mean);
|
Delay(float mean);
|
||||||
Delay(float mean,
|
Delay(float mean,
|
||||||
float sigma2_early,
|
float sigma2_early,
|
||||||
|
|
|
||||||
|
|
@ -936,7 +936,7 @@ Network::findInstPinsMatching(const Instance *instance,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Network::location(const Pin *pin,
|
Network::location(const Pin *,
|
||||||
// Return values.
|
// Return values.
|
||||||
double &x,
|
double &x,
|
||||||
double &y,
|
double &y,
|
||||||
|
|
|
||||||
|
|
@ -1540,7 +1540,6 @@ Sdc::removeClockLatency(const Clock *clk,
|
||||||
void
|
void
|
||||||
Sdc::deleteClockLatency(ClockLatency *latency)
|
Sdc::deleteClockLatency(ClockLatency *latency)
|
||||||
{
|
{
|
||||||
const Pin *pin = latency->pin();
|
|
||||||
clk_latencies_.erase(latency);
|
clk_latencies_.erase(latency);
|
||||||
delete latency;
|
delete latency;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,6 @@ CheckCapacitanceLimits::checkCapacitance(const Pin *pin,
|
||||||
float &limit) const
|
float &limit) const
|
||||||
{
|
{
|
||||||
const DcalcAnalysisPt *dcalc_ap = corner->findDcalcAnalysisPt(min_max);
|
const DcalcAnalysisPt *dcalc_ap = corner->findDcalcAnalysisPt(min_max);
|
||||||
const OperatingConditions *op_cond = dcalc_ap->operatingConditions();
|
|
||||||
GraphDelayCalc *dcalc = sta_->graphDelayCalc();
|
GraphDelayCalc *dcalc = sta_->graphDelayCalc();
|
||||||
float cap = dcalc->loadCap(pin, dcalc_ap);
|
float cap = dcalc->loadCap(pin, dcalc_ap);
|
||||||
|
|
||||||
|
|
@ -248,7 +247,6 @@ CheckCapacitanceLimits::pinCapacitanceLimitViolations(Instance *inst,
|
||||||
PinSeq *violators)
|
PinSeq *violators)
|
||||||
{
|
{
|
||||||
const Network *network = sta_->network();
|
const Network *network = sta_->network();
|
||||||
const Sim *sim = sta_->sim();
|
|
||||||
InstancePinIterator *pin_iter = network->pinIterator(inst);
|
InstancePinIterator *pin_iter = network->pinIterator(inst);
|
||||||
while (pin_iter->hasNext()) {
|
while (pin_iter->hasNext()) {
|
||||||
Pin *pin = pin_iter->next();
|
Pin *pin = pin_iter->next();
|
||||||
|
|
@ -292,7 +290,6 @@ CheckCapacitanceLimits::pinMinCapacitanceLimitSlack(Instance *inst,
|
||||||
float &min_slack)
|
float &min_slack)
|
||||||
{
|
{
|
||||||
const Network *network = sta_->network();
|
const Network *network = sta_->network();
|
||||||
const Sim *sim = sta_->sim();
|
|
||||||
InstancePinIterator *pin_iter = network->pinIterator(inst);
|
InstancePinIterator *pin_iter = network->pinIterator(inst);
|
||||||
while (pin_iter->hasNext()) {
|
while (pin_iter->hasNext()) {
|
||||||
Pin *pin = pin_iter->next();
|
Pin *pin = pin_iter->next();
|
||||||
|
|
@ -320,7 +317,6 @@ CheckCapacitanceLimits::checkPin(Pin *pin)
|
||||||
const Sim *sim = sta_->sim();
|
const Sim *sim = sta_->sim();
|
||||||
const Sdc *sdc = sta_->sdc();
|
const Sdc *sdc = sta_->sdc();
|
||||||
const Graph *graph = sta_->graph();
|
const Graph *graph = sta_->graph();
|
||||||
Search *search = sta_->search();
|
|
||||||
Vertex *vertex = graph->pinLoadVertex(pin);
|
Vertex *vertex = graph->pinLoadVertex(pin);
|
||||||
return network->direction(pin)->isAnyOutput()
|
return network->direction(pin)->isAnyOutput()
|
||||||
&& !sim->logicZeroOne(pin)
|
&& !sim->logicZeroOne(pin)
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,6 @@ CheckFanoutLimits::pinFanoutLimitViolations(Instance *inst,
|
||||||
PinSeq *violators)
|
PinSeq *violators)
|
||||||
{
|
{
|
||||||
const Network *network = sta_->network();
|
const Network *network = sta_->network();
|
||||||
const Sim *sim = sta_->sim();
|
|
||||||
InstancePinIterator *pin_iter = network->pinIterator(inst);
|
InstancePinIterator *pin_iter = network->pinIterator(inst);
|
||||||
while (pin_iter->hasNext()) {
|
while (pin_iter->hasNext()) {
|
||||||
Pin *pin = pin_iter->next();
|
Pin *pin = pin_iter->next();
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,8 @@ PathVertex::setRequired(const Required &required,
|
||||||
int arrival_count = tag_group->arrivalCount();
|
int arrival_count = tag_group->arrivalCount();
|
||||||
if (!vertex_->hasRequireds()) {
|
if (!vertex_->hasRequireds()) {
|
||||||
Arrival *new_arrivals = graph->makeArrivals(vertex_, arrival_count * 2);
|
Arrival *new_arrivals = graph->makeArrivals(vertex_, arrival_count * 2);
|
||||||
memcpy(new_arrivals, arrivals, arrival_count * sizeof(Arrival));
|
for (int i = 0; i < arrival_count; i++)
|
||||||
|
new_arrivals[i] =arrivals[i];
|
||||||
vertex_->setHasRequireds(true);
|
vertex_->setHasRequireds(true);
|
||||||
arrivals = new_arrivals;
|
arrivals = new_arrivals;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -840,7 +840,6 @@ Power::findInputDuty(const Pin *to_pin,
|
||||||
InternalPower *pwr)
|
InternalPower *pwr)
|
||||||
|
|
||||||
{
|
{
|
||||||
const char *related_pg_pin = pwr->relatedPgPin();
|
|
||||||
const LibertyPort *from_port = pwr->relatedPort();
|
const LibertyPort *from_port = pwr->relatedPort();
|
||||||
if (from_port) {
|
if (from_port) {
|
||||||
const Pin *from_pin = network_->findPin(inst, from_port);
|
const Pin *from_pin = network_->findPin(inst, from_port);
|
||||||
|
|
@ -889,28 +888,6 @@ isPositiveUnate(const LibertyCell *cell,
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static bool
|
|
||||||
isPortRef(FuncExpr *expr,
|
|
||||||
const LibertyPort *port)
|
|
||||||
{
|
|
||||||
return (expr->op() == FuncExpr::op_port
|
|
||||||
&& expr->port() == port)
|
|
||||||
|| (expr->op() == FuncExpr::op_not
|
|
||||||
&& expr->left()->op() == FuncExpr::op_port
|
|
||||||
&& expr->left()->port() == port);
|
|
||||||
}
|
|
||||||
|
|
||||||
static FuncExpr *
|
|
||||||
negate(FuncExpr *expr)
|
|
||||||
{
|
|
||||||
if (expr->op() == FuncExpr::op_not)
|
|
||||||
return expr->left()->copy();
|
|
||||||
else
|
|
||||||
return FuncExpr::makeNot(expr->copy());
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Power::findLeakagePower(const Instance *,
|
Power::findLeakagePower(const Instance *,
|
||||||
LibertyCell *cell,
|
LibertyCell *cell,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue