Set SIL stage to lowered at the *start* of address lowering
Set SIL stage to lowered at the *start* of address lowering

SIL is not in a consistent state during the lowering pass. We just make sure it is correct at the end of the pass. This broke PR https://github.com/apple/swift/pull/13283 (verifying convert_function instructions in the builder)

To workaround this issue we will be running the builder’s verifier when the SIL stage != SILStage::Lowered

The SIL stage is set to lowered at the end of the module pass. This means that if this is the first lowering pass said workaround would not work.

This commit sets the SIL stage to lowered at the beginning of the module pass instead

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