Rewrite and clean up SSA destruction.
Add support for implementing cycles with copies and free register.