These idioms already appear a number of places in code, and upcoming changes to the various sanitizers continue to need more instances of the same patterns.
Posting this for review to gather feedback on the naming. I don't particularly like the names I chose, and am wondering if anyone has a better idea.
I guess this is bike shedding but given IRBuilder has functions like getInt16() to return the IR form on a 16-bit integer value, how about just CreateElementCount that returns the IR form of ElementCount?
Not isolated to this patch but in general I dislike the use of runtime when naming things we've already named in order to allow for fixed length and scalable vectors. By which I mean I don't really consider CompileTimeElementCount/TypeSize as something that exists. But then perhaps I'm just being too picky :)