diff options
| author | Uday Bondhugula <bondhugula@google.com> | 2018-10-12 14:54:54 -0700 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 13:29:21 -0700 |
| commit | 86eac4618c06a54c1f6d95a8c9d94b15dda5e35b (patch) | |
| tree | a6574eb104b867e24814319c44b26d953527f4c2 /mlir/lib/Analysis/AffineAnalysis.cpp | |
| parent | 9e3b928e32285bf47d366d5685d2c65e616544cb (diff) | |
| download | bcm5719-llvm-86eac4618c06a54c1f6d95a8c9d94b15dda5e35b.tar.gz bcm5719-llvm-86eac4618c06a54c1f6d95a8c9d94b15dda5e35b.zip | |
Create private exclusive / single use affine computation slice for an op stmt.
- add util to create a private / exclusive / single use affine
computation slice for an op stmt (see method doc comment); a single
multi-result affine_apply op is prepended to the op stmt to provide all
results needed for its operands as a function of loop iterators and symbols.
- use it for DMA pipelining (to create private slices for DMA start stmt's);
resolve TODOs/feature request (b/117159533)
- move createComposedAffineApplyOp to Transforms/Utils; free it from taking a
memref as input / generalize it.
PiperOrigin-RevId: 216926818
Diffstat (limited to 'mlir/lib/Analysis/AffineAnalysis.cpp')
| -rw-r--r-- | mlir/lib/Analysis/AffineAnalysis.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Analysis/AffineAnalysis.cpp b/mlir/lib/Analysis/AffineAnalysis.cpp index f332836180a..ee1641b575e 100644 --- a/mlir/lib/Analysis/AffineAnalysis.cpp +++ b/mlir/lib/Analysis/AffineAnalysis.cpp @@ -304,8 +304,8 @@ AffineExpr mlir::simplifyAffineExpr(AffineExpr expr, unsigned numDims, // TODO(andydavis) Add a method to AffineApplyOp which forward substitutes // the AffineApplyOp into any user AffineApplyOps. void mlir::getReachableAffineApplyOps( - const SmallVector<MLValue *, 4> &operands, - SmallVector<OperationStmt *, 4> *affineApplyOps) { + ArrayRef<MLValue *> operands, + SmallVectorImpl<OperationStmt *> &affineApplyOps) { struct State { // The ssa value for this node in the DFS traversal. MLValue *value; @@ -329,7 +329,7 @@ void mlir::getReachableAffineApplyOps( if (auto affineApplyOp = opStmt->getAs<AffineApplyOp>()) { if (state.operandIndex == 0) { // Pre-Visit: Add 'opStmt' to reachable sequence. - affineApplyOps->push_back(opStmt); + affineApplyOps.push_back(opStmt); } if (state.operandIndex < opStmt->getNumOperands()) { // Visit: Add next 'affineApplyOp' operand to worklist. |

