[mlir] Add NumberOfExecutions analysis + update RegionBranchOpInterface interface to query number of region invocations

Implements RFC discussed in: https://llvm.discourse.group/t/rfc-operationinstancesinterface-or-any-better-name/2158/10

Reviewed By: silvas, ftynse, rriddle

Differential Revision: https://reviews.llvm.org/D90922
This commit is contained in:
Eugene Zhulenev
2020-11-11 01:38:51 -08:00
parent cc5b4a8603
commit bb0d5f767d
19 changed files with 786 additions and 7 deletions

View File

@@ -73,6 +73,9 @@ detail::verifyBranchSuccessorOperands(Operation *op, unsigned succNo,
// RegionBranchOpInterface
//===----------------------------------------------------------------------===//
// A constant value to represent unknown number of region invocations.
const int64_t mlir::kUnknownNumRegionInvocations = -1;
/// Verify that types match along all region control flow edges originating from
/// `sourceNo` (region # if source is a region, llvm::None if source is parent
/// op). `getInputsTypesForRegion` is a function that returns the types of the