I've sent these before as part of my work on calling the nir optimisations passes earlier however I've dropped the controversial changes in order to land these tidy ups. Patches 3 & 4 will help enabled us to call the nir passes earlier the others are just tidy ups.