Whenever more rigorous optimizations are attempted (or even basic ones), it's usually helpful to know what overall kind of instruction is being dealt with, in the event certain classes of instructions may be eligible for optimization.
Type-checking is now occuring in more than one place.