Use dependent-optimization framework to speed up typetightener.

Change-Id: I7e961e927348ce19b72ae719fcc254c4fe02e892