Skip to content

Commit

Permalink
[MLIR][SCF] Improve doc (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
chelini committed Jun 8, 2022
1 parent 7207373 commit d484797
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions mlir/include/mlir/Dialect/SCF/SCFOps.td
Expand Up @@ -111,6 +111,10 @@ def ExecuteRegionOp : SCF_Op<"execute_region", [
let hasVerifier = 1;
}

//===----------------------------------------------------------------------===//
// ForOp
//===----------------------------------------------------------------------===//

def ForOp : SCF_Op<"for",
[AutomaticAllocationScope, DeclareOpInterfaceMethods<LoopLikeOpInterface,
["getSingleInductionVar", "getSingleLowerBound", "getSingleStep",
Expand Down Expand Up @@ -427,6 +431,10 @@ def ForeachThreadOp : SCF_Op<"foreach_thread", [
}];
}

//===----------------------------------------------------------------------===//
// PerformConcurrentlyOp
//===----------------------------------------------------------------------===//

def PerformConcurrentlyOp : SCF_Op<"foreach_thread.perform_concurrently", [
NoSideEffect,
Terminator,
Expand Down Expand Up @@ -462,6 +470,10 @@ def PerformConcurrentlyOp : SCF_Op<"foreach_thread.perform_concurrently", [
}];
}

//===----------------------------------------------------------------------===//
// ParallelInsertSliceOp
//===----------------------------------------------------------------------===//

// TODO: Implement PerformConcurrentlyOpInterface.
def ParallelInsertSliceOp : SCF_Op<"foreach_thread.parallel_insert_slice", [
AttrSizedOperandSegments,
Expand Down Expand Up @@ -652,6 +664,10 @@ def IfOp : SCF_Op<"if",
let hasVerifier = 1;
}

//===----------------------------------------------------------------------===//
// ParallelOp
//===----------------------------------------------------------------------===//

def ParallelOp : SCF_Op<"parallel",
[AutomaticAllocationScope,
AttrSizedOperandSegments,
Expand Down Expand Up @@ -736,6 +752,10 @@ def ParallelOp : SCF_Op<"parallel",
let hasVerifier = 1;
}

//===----------------------------------------------------------------------===//
// ReduceOp
//===----------------------------------------------------------------------===//

def ReduceOp : SCF_Op<"reduce", [HasParent<"ParallelOp">]> {
let summary = "reduce operation for parallel for";
let description = [{
Expand Down Expand Up @@ -786,6 +806,10 @@ def ReduceOp : SCF_Op<"reduce", [HasParent<"ParallelOp">]> {
let hasRegionVerifier = 1;
}

//===----------------------------------------------------------------------===//
// ReduceReturnOp
//===----------------------------------------------------------------------===//

def ReduceReturnOp :
SCF_Op<"reduce.return", [HasParent<"ReduceOp">, NoSideEffect,
Terminator]> {
Expand All @@ -805,6 +829,10 @@ def ReduceReturnOp :
let hasVerifier = 1;
}

//===----------------------------------------------------------------------===//
// WhileOp
//===----------------------------------------------------------------------===//

def WhileOp : SCF_Op<"while",
[DeclareOpInterfaceMethods<RegionBranchOpInterface>,
RecursiveSideEffects]> {
Expand Down Expand Up @@ -939,6 +967,10 @@ def WhileOp : SCF_Op<"while",
let hasRegionVerifier = 1;
}

//===----------------------------------------------------------------------===//
// YieldOp
//===----------------------------------------------------------------------===//

def YieldOp : SCF_Op<"yield", [NoSideEffect, ReturnLike, Terminator,
ParentOneOf<["ExecuteRegionOp, ForOp",
"IfOp, ParallelOp, WhileOp"]>]> {
Expand Down

0 comments on commit d484797

Please sign in to comment.