HLSL is arguably very different, because (1) we do not put effort into optimizing compilation speed at all, (2) we have to do a *lot* of optimization and lowering passes.
If we want the cleanest and safest approach, at the cost of speed, we'd obviously just have helpers that add one instruction at a time, or even helpers that build a "block" of multiple instructions that you can add all at once. That might be less efficient than reserving space and then initialising the instructions as they're done here, though, although I don't know if the difference matters. If it's cases like what's in this patch, just adding one instruction at a time, it probably doesn't...