We understand how scan chains are inserted and their impact on the circuit. Now, let’s focus on the main topic: how the tool optimizes the scan chain.
Scan chain reordering helps optimize routing resources and reduces congestion in the design. This process is known as scan chain reordering.
Let’s consider an example of scan chains before and after reordering to see how routing resources are saved.
Before Scan Chain Reordering

In the above figure, we can see that route1 and route2 completes the scan chain routing which is comparatively longer route than after scan chain reordering where we have small route length completing our requirement. During placement optimization, tool does these optimizations to save route tracks for the clock/signal routing at later stages.
After the Scan Chain Reordering

We have less routing congestion and is getting estimated by trial route run.