add a simplification pass that removes redundant variable declarations