@@ -1114,22 +1114,23 @@ Resizer::repairHoldViolations(VertexSet &ends,
11141114 LibertyCell *buffer_cell)
11151115{
11161116 inserted_buffer_count_ = 0 ;
1117- Slack worst_slack, prev_slack ;
1117+ Slack worst_slack;
11181118 Vertex *worst_vertex;
11191119 sta_->worstSlack (MinMax::min (), worst_slack, worst_vertex);
1120- prev_slack = worst_slack * 2 ;
1120+ debugPrint1 (debug_, " repair_hold" , 1 , " worst_slack=%s\n " ,
1121+ units_->timeUnit ()->asString (worst_slack, 3 ));
1122+ int repair_count = 1 ;
11211123
11221124 int pass = 1 ;
11231125 while (worst_slack < 0.0
11241126 // Make sure we are making progress.
1125- && abs (worst_slack - prev_slack) > abs (prev_slack) * .001 ) {
1126- debugPrint2 (debug_, " repair_hold" , 1 , " pass %d worst_slack=%s\n " ,
1127- pass,
1128- units_->timeUnit ()->asString (worst_slack, 3 ));
1129- repairHoldPass (ends, buffer_cell);
1127+ && repair_count > 0 ) {
1128+ debugPrint1 (debug_, " repair_hold" , 1 , " pass %d\n " , pass);
1129+ repair_count = repairHoldPass (ends, buffer_cell);
11301130 sta_->findRequireds ();
1131- prev_slack = worst_slack;
11321131 sta_->worstSlack (MinMax::min (), worst_slack, worst_vertex);
1132+ debugPrint1 (debug_, " repair_hold" , 1 , " worst_slack=%s\n " ,
1133+ units_->timeUnit ()->asString (worst_slack, 3 ));
11331134 pass++;
11341135 }
11351136 if (inserted_buffer_count_ > 0 ) {
@@ -1138,7 +1139,7 @@ Resizer::repairHoldViolations(VertexSet &ends,
11381139 }
11391140}
11401141
1141- void
1142+ int
11421143Resizer::repairHoldPass (VertexSet &ends,
11431144 LibertyCell *buffer_cell)
11441145{
@@ -1172,6 +1173,7 @@ Resizer::repairHoldPass(VertexSet &ends,
11721173 }
11731174 }
11741175 }
1176+ return repair_count;
11751177}
11761178
11771179void
0 commit comments