Fixed errors in global analysis and added loop invariant motion
Finixhed monotonic check and loop hositing code