The previous form, taking opcode and type, is moved to an internal
helper and the new form, taking an instruction, is a wrapper around this
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.