Modify the optimization pipeline to better support custom array iterators
Modify the optimization pipeline to better support custom array iterators

This patch is supposed to recover the performance regressions that would be introduced by yet to be merged PR #9145, which introduces custom, more efficient array iterators.

The crucial part of this patch is running loop unrolling also during the mid-level optimizations phase, because it may catch more loops with constant trip counts. To make trip counts constant, an additional run of constant propagation is helpful.

karwa/swift,parkera/swift,brentdax/swift,gregomni/swift,harlanhaskins/swift,deyton/swift,uasys/swift,jmgc/swift,return/swift,jopamer/swift,apple/swift,aschwaighofer/swift,uasys/swift,gribozavr/swift,apple/swift,jckarter/swift,parkera/swift,CodaFi/swift,CodaFi/swift,benlangmuir/swift,zisko/swift,roambotics/swift,jopamer/swift,zisko/swift,milseman/swift,return/swift,jmgc/swift,jckarter/swift,lorentey/swift,ahoppen/swift,amraboelela/swift,practicalswift/swift,stephentyrone/swift,milseman/swift,devincoughlin/swift,huonw/swift,alblue/swift,deyton/swift,stephentyrone/swift,austinzheng/swift,tjw/swift,sschiau/swift,alblue/swift,devincoughlin/swift,stephentyrone/swift,sschiau/swift,glessard/swift,karwa/swift,natecook1000/swift,xwu/swift,practicalswift/swift,huonw/swift,ahoppen/swift,benlangmuir/swift,amraboelela/swift,uasys/swift,ahoppen/swift,aschwaighofer/swift,return/swift,nathawes/swift,shahmishal/swift,shajrawi/swift,allevato/swift,sschiau/swift,JGiola/swift,gribozavr/swift,shajrawi/swift,milseman/swift,practicalswift/swift,xwu/swift,alblue/swift,xwu/swift,gribozavr/swift,danielmartin/swift,gregomni/swift,devincoughlin/swift,danielmartin/swift,shahmishal/swift,OscarSwanros/swift,devincoughlin/swift,austinzheng/swift,karwa/swift,atrick/swift,karwa/swift,devincoughlin/swift,frootloops/swift,tjw/swift,benlangmuir/swift,gribozavr/swift,austinzheng/swift,airspeedswift/swift,tjw/swift,jopamer/swift,parkera/swift,atrick/swift,lorentey/swift,danielmartin/swift,gribozavr/swift,zisko/swift,brentdax/swift,airspeedswift/swift,JGiola/swift,gregomni/swift,benlangmuir/swift,OscarSwanros/swift,nathawes/swift,natecook1000/swift,gribozavr/swift,shajrawi/swift,shajrawi/swift,alblue/swift,roambotics/swift,CodaFi/swift,xwu/swift,gribozavr/swift,xwu/swift,shahmishal/swift,JGiola/swift,airspeedswift/swift,tkremenek/swift,austinzheng/swift,ahoppen/swift,jmgc/swift,swiftix/swift,frootloops/swift,atrick/swift,uasys/swift,deyton/swift,jopamer/swift,amraboelela/swift,harlanhaskins/swift,apple/swift,xedin/swift,tkremenek/swift,uasys/swift,OscarSwanros/swift,gregomni/swift,natecook1000/swift,zisko/swift,atrick/swift,return/swift,uasys/swift,glessard/swift,natecook1000/swift,amraboelela/swift,shahmishal/swift,shajrawi/swift,huonw/swift,swiftix/swift,lorentey/swift,jopamer/swift,nathawes/swift,tkremenek/swift,deyton/swift,zisko/swift,xedin/swift,nathawes/swift,jckarter/swift,roambotics/swift,karwa/swift,danielmartin/swift,sschiau/swift,milseman/swift,shajrawi/swift,xwu/swift,xedin/swift,brentdax/swift,natecook1000/swift,apple/swift,sschiau/swift,JGiola/swift,jmgc/swift,rudkx/swift,lorentey/swift,milseman/swift,hooman/swift,xedin/swift,CodaFi/swift,devincoughlin/swift,huonw/swift,huonw/swift,benlangmuir/swift,jckarter/swift,alblue/swift,swiftix/swift,amraboelela/swift,milseman/swift,xedin/swift,shajrawi/swift,practicalswift/swift,frootloops/swift,airspeedswift/swift,return/swift,shahmishal/swift,airspeedswift/swift,stephentyrone/swift,airspeedswift/swift,zisko/swift,rudkx/swift,CodaFi/swift,allevato/swift,uasys/swift,atrick/swift,jmgc/swift,frootloops/swift,aschwaighofer/swift,brentdax/swift,brentdax/swift,austinzheng/swift,austinzheng/swift,jmgc/swift,zisko/swift,gregomni/swift,danielmartin/swift,tkremenek/swift,allevato/swift,parkera/swift,OscarSwanros/swift,jckarter/swift,return/swift,rudkx/swift,deyton/swift,stephentyrone/swift,tjw/swift,sschiau/swift,lorentey/swift,roambotics/swift,devincoughlin/swift,shahmishal/swift,glessard/swift,airspeedswift/swift,harlanhaskins/swift,aschwaighofer/swift,glessard/swift,hooman/swift,OscarSwanros/swift,frootloops/swift,hooman/swift,gregomni/swift,allevato/swift,JGiola/swift,ahoppen/swift,rudkx/swift,roambotics/swift,nathawes/swift,karwa/swift,swiftix/swift,CodaFi/swift,ahoppen/swift,frootloops/swift,benlangmuir/swift,gribozavr/swift,glessard/swift,hooman/swift,deyton/swift,practicalswift/swift,harlanhaskins/swift,apple/swift,swiftix/swift,aschwaighofer/swift,natecook1000/swift,hooman/swift,tkremenek/swift,swiftix/swift,tkremenek/swift,jopamer/swift,aschwaighofer/swift,return/swift,practicalswift/swift,shahmishal/swift,tjw/swift,practicalswift/swift,shajrawi/swift,jckarter/swift,natecook1000/swift,lorentey/swift,rudkx/swift,stephentyrone/swift,apple/swift,harlanhaskins/swift,brentdax/swift,parkera/swift,nathawes/swift,danielmartin/swift,CodaFi/swift,OscarSwanros/swift,karwa/swift,aschwaighofer/swift,allevato/swift,huonw/swift,shahmishal/swift,parkera/swift,lorentey/swift,lorentey/swift,harlanhaskins/swift,xedin/swift,sschiau/swift,hooman/swift,jmgc/swift,JGiola/swift,roambotics/swift,rudkx/swift,xwu/swift,jckarter/swift,parkera/swift,xedin/swift,danielmartin/swift,tjw/swift,allevato/swift,amraboelela/swift,frootloops/swift,tjw/swift,nathawes/swift,atrick/swift,brentdax/swift,alblue/swift,parkera/swift,deyton/swift,amraboelela/swift,sschiau/swift,hooman/swift,xedin/swift,glessard/swift,huonw/swift,jopamer/swift,devincoughlin/swift,karwa/swift,stephentyrone/swift,OscarSwanros/swift,harlanhaskins/swift,swiftix/swift,tkremenek/swift,practicalswift/swift,alblue/swift,allevato/swift,austinzheng/swift,milseman/swift