[flang-commits] [flang] [mlir] [mlir][flang] Added Weighted[Region]BranchOpInterface's. (PR #142079)
Slava Zakharin via flang-commits
flang-commits at lists.llvm.org
Wed Jun 11 20:17:24 PDT 2025
================
@@ -375,6 +375,114 @@ def SelectLikeOpInterface : OpInterface<"SelectLikeOpInterface"> {
];
}
+//===----------------------------------------------------------------------===//
+// WeightedBranchOpInterface
+//===----------------------------------------------------------------------===//
+
+def WeightedBranchOpInterface : OpInterface<"WeightedBranchOpInterface"> {
+ let description = [{
+ This interface provides weight information for branching terminator
+ operations, i.e. terminator operations with successors.
+
+ This interface provides methods for getting/setting integer non-negative
+ weight of each branch. The probability of executing a branch
+ is computed as the ratio between the branch's weight and the total
+ sum of the weights.
+ The number of weights must match the number of successors of the operation,
+ with one exception for CallOpInterface operations, which may only
----------------
vzakhari wrote:
Had time to do this today. Please let me know how it looks.
https://github.com/llvm/llvm-project/pull/142079
More information about the flang-commits
mailing list