@@ -3900,7 +3900,6 @@ Sta::setAnnotatedSlew(Vertex *vertex,
39003900 const RiseFallBoth *rf,
39013901 float slew)
39023902{
3903- ensureGraph ();
39043903 for (const MinMax *mm : min_max->range ()) {
39053904 DcalcAPIndex ap_index = scene->dcalcAnalysisPtIndex (mm);
39063905 for (const RiseFall *rf1 : rf->range ()) {
@@ -3912,6 +3911,24 @@ Sta::setAnnotatedSlew(Vertex *vertex,
39123911 graph_delay_calc_->delayInvalid (vertex);
39133912}
39143913
3914+ void
3915+ Sta::unsetAnnotatedSlew (Vertex *vertex,
3916+ const Scene *scene,
3917+ const MinMaxAll *min_max,
3918+ const RiseFallBoth *rf)
3919+ {
3920+ for (const MinMax *mm : min_max->range ()) {
3921+ DcalcAPIndex ap_index = scene->dcalcAnalysisPtIndex (mm);
3922+ for (const RiseFall *rf1 : rf->range ()) {
3923+ vertex->setSlewAnnotated (false , rf1, ap_index);
3924+ }
3925+ }
3926+ if (vertex->isDriver (network_))
3927+ graph_delay_calc_->delayInvalid (vertex);
3928+ else
3929+ delaysInvalidFromFanin (vertex);
3930+ }
3931+
39153932void
39163933Sta::writeSdf (std::string_view filename,
39173934 const Scene *scene,
@@ -4316,8 +4333,15 @@ Parasitics *
43164333Sta::makeConcreteParasitics (std::string_view name,
43174334 std::string_view filename)
43184335{
4336+ // Free the prior entry to avoid leaking it on overwrite.
4337+ std::string key (name);
4338+ auto it = parasitics_name_map_.find (key);
4339+ if (it != parasitics_name_map_.end ()) {
4340+ delete it->second ;
4341+ parasitics_name_map_.erase (it);
4342+ }
43194343 Parasitics *parasitics = new ConcreteParasitics (name, filename, this );
4320- parasitics_name_map_[std::string (name) ] = parasitics;
4344+ parasitics_name_map_[key ] = parasitics;
43214345 return parasitics;
43224346}
43234347
0 commit comments