Add support for attaching branch weight metadata directly from the IRBuilder.