[all-commits] [llvm/llvm-project] 99d03f: [MLIR][LLVMDialect] Added branch weights attribute...
George Mitenkov via All-commits
all-commits at lists.llvm.org
Fri Jul 24 00:14:27 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 99d03f03919498b688a8921b2ec669057772803f
https://github.com/llvm/llvm-project/commit/99d03f03919498b688a8921b2ec669057772803f
Author: George Mitenkov <georgemitenk0v at gmail.com>
Date: 2020-07-24 (Fri, 24 Jul 2020)
Changed paths:
M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
M mlir/test/Target/llvmir.mlir
Log Message:
-----------
[MLIR][LLVMDialect] Added branch weights attribute to CondBrOp
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`.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D83658
More information about the All-commits
mailing list