This patch introduces branch weights metadata to llvm.cond_br op in LLVM Dialect. It is modelled as optional ElementsAttr, for example:
llvm.cond_br %cond weights(dense<[1, 3]> : vector<2xi32>), ^bb1, ^bb2
When exporting to proper LLVM, this attribute is transformed into metadata node. The test for metadata creation is added to ../Target/llvmir.mlir.
Can this use DenseElementsAttr instead of ArrayAttr? It is more efficient and likely easier to work with in this use case.