[PM] Use range-based for and auto to clean up some of the LoopInfo code.