Preparing for loop optimizations