Automated optimization of reconfigurable designs