Commits

John McCall committed ee4aa147030
Stop reordering blocks in SILBuilder::emitBlock. This change permits SILGen to make smarter decisions about block placement by keeping related blocks together instead of always inserting to the end to the function. The flipside is that SILGen needs to be somewhat careful to create blocks in the right order. Counter-intuitively, that order is the reverse of the order in which the blocks should be laid out, since blocks created later will be inserted before blocks created earlier. Note, however, that this produces the right results for recursive emission. To that end, adjust a couple of places in SILGen to create blocks in properly nested order. All of the block-order differences in the tests seem to be desirable; several of them even had confused comments wondering how on earth a block got injected where it did. Also, fix the implementation of SILBuilder::moveBlockTo, and fix a latent bug in epilogue emission where epilogBB was erased from its parent (deleting it) and then queried multiple times (!). Swift SVN r26428