Skip to content

Commit

Permalink
deprecate TimingArcSet::timingArcIterator(), Sdc::clockIterator()
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcherry56 committed Dec 29, 2019
1 parent 77f22e4 commit b18ae6f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
23 changes: 23 additions & 0 deletions doc/ApiChanges.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@

This file summarizes STA API changes for each release.

The following iterator functions are deprecated:

TimingArcSet::timingArcIterator()
Sdc::clockIterator()

Use the iterator class constructor instead. This avoids new/deletes of
the iterators by stack allocating them. For example,
Instead of

TimingArcSetArcIterator *arc_iter = arc_set->timingArcIterator();
while (arc_iter->hasNext()) {
TimingArc *arc = arc_iter->next();
}
delete arc_iter;

use the following:

TimingArcSetArcIterator arc_iter(arc_set);
while (arc_iter.hasNext()) {
TimingArc *arc = arc_iter.next();
}


Release 2.0.17 2019/11/11
-------------------------

Expand Down
3 changes: 2 additions & 1 deletion liberty/TimingArc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ public:
TimingArc *&arc1,
TimingArc *&arc2);
const TimingArcSeq &arcs() const { return arcs_; }
TimingArcSetArcIterator *timingArcIterator();
// Use the TimingArcSetArcIterator(arc_set) constructor instead.
TimingArcSetArcIterator *timingArcIterator() __attribute__ ((deprecated));
TimingArcIndex addTimingArc(TimingArc *arc);
void deleteTimingArc(TimingArc *arc);
TimingArc *findTimingArc(unsigned arc_index);
Expand Down
2 changes: 1 addition & 1 deletion sdc/Sdc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ public:
// Find the clocks defined for pin.
ClockSet *findClocks(const Pin *pin) const;
ClockSet *findLeafPinClocks(const Pin *pin) const;
ClockIterator *clockIterator();
ClockIterator *clockIterator() __attribute__ ((deprecated));
void sortedClocks(ClockSeq &clks);
ClockSeq *clocks() { return &clocks_; }
ClockSeq &clks() { return clocks_; }
Expand Down

0 comments on commit b18ae6f

Please sign in to comment.