[globalopt] Use std::reverse instead of trying to reverse an array by hand.
[globalopt] Use std::reverse instead of trying to reverse an array by hand.

I also changed a dyn_cast to a cast since we assume here that the cast can never
fail.

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