added loop invariant code motion and pure map