some work to use PHI instruction for links and variable renaming