@@ -754,27 +754,24 @@ std::vector<Point> IOPlacer::findLayerSlots(const int layer,
754754{
755755 bool vertical_pin;
756756 int min, max;
757- odb::Point edge_start, edge_end, lb, ub;
758- int lb_x, lb_y, ub_x, ub_y;
757+
758+ odb::Point lb = core_->getBoundary ().ll ();
759+ odb::Point ub = core_->getBoundary ().ur ();
760+ int lb_x = lb.x ();
761+ int lb_y = lb.y ();
762+ int ub_x = ub.x ();
763+ int ub_y = ub.y ();
759764
760765 if (is_die_polygon) {
761- edge_start = line.pt0 ();
762- edge_end = line.pt1 ();
766+ const odb::Point& edge_start = line.pt0 ();
767+ const odb::Point& edge_end = line.pt1 ();
763768
764769 vertical_pin = (edge_start.getY () == edge_end.getY ());
765770 min = vertical_pin ? std::min (edge_start.getX (), edge_end.getX ())
766771 : std::min (edge_start.getY (), edge_end.getY ());
767772 max = vertical_pin ? std::max (edge_start.getX (), edge_end.getX ())
768773 : std::max (edge_start.getY (), edge_end.getY ());
769774 } else {
770- lb = core_->getBoundary ().ll ();
771- ub = core_->getBoundary ().ur ();
772-
773- lb_x = lb.x ();
774- lb_y = lb.y ();
775- ub_x = ub.x ();
776- ub_y = ub.y ();
777-
778775 vertical_pin = (edge == Edge::top || edge == Edge::bottom);
779776 min = vertical_pin ? lb_x : lb_y;
780777 max = vertical_pin ? ub_x : ub_y;
@@ -847,7 +844,7 @@ std::vector<Point> IOPlacer::findLayerSlots(const int layer,
847844 int curr_y;
848845 curr_x = init_tracks + start_idx * min_dst_pins;
849846 if (is_die_polygon) {
850- curr_y = edge_start .getY ();
847+ curr_y = line. pt0 () .getY ();
851848 } else {
852849 curr_y = (edge == Edge::bottom) ? lb_y : ub_y;
853850 }
@@ -862,7 +859,7 @@ std::vector<Point> IOPlacer::findLayerSlots(const int layer,
862859 int curr_y;
863860 curr_y = init_tracks + start_idx * min_dst_pins;
864861 if (is_die_polygon) {
865- curr_x = edge_start .getX ();
862+ curr_x = line. pt0 () .getX ();
866863 } else {
867864 curr_x = (edge == Edge::left) ? lb_x : ub_x;
868865 }
0 commit comments