diff options
| author | Uday Bondhugula <bondhugula@google.com> | 2019-01-25 14:06:32 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 15:37:53 -0700 |
| commit | b588d58c5f2c8c570600210050bd9beaed0c3a24 (patch) | |
| tree | 91c0072ea3bbe731d932c532c656cebc34c68599 /mlir/lib/Transforms/PipelineDataTransfer.cpp | |
| parent | c3424c3c7526641a08c993ab881c1d4e237bfddb (diff) | |
| download | bcm5719-llvm-b588d58c5f2c8c570600210050bd9beaed0c3a24.tar.gz bcm5719-llvm-b588d58c5f2c8c570600210050bd9beaed0c3a24.zip | |
Update createAffineComputationSlice to generate single result affine maps
- Update createAffineComputationSlice to generate a sequence of single result
affine apply ops instead of one multi-result affine apply
- update pipeline-data-transfer test case; while on this, also update the test
case to use only single result affine maps, and make it more robust to
change.
PiperOrigin-RevId: 230965478
Diffstat (limited to 'mlir/lib/Transforms/PipelineDataTransfer.cpp')
| -rw-r--r-- | mlir/lib/Transforms/PipelineDataTransfer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/PipelineDataTransfer.cpp b/mlir/lib/Transforms/PipelineDataTransfer.cpp index 9e7c928070f..101a00eaf61 100644 --- a/mlir/lib/Transforms/PipelineDataTransfer.cpp +++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp @@ -325,8 +325,12 @@ PassResult PipelineDataTransfer::runOnForInst(ForInst *forInst) { assert(dmaStartInst->isa<DmaStartOp>()); instShiftMap[dmaStartInst] = 0; // Set shifts for DMA start inst's affine operand computation slices to 0. - if (auto *slice = mlir::createAffineComputationSlice(dmaStartInst)) { - instShiftMap[slice] = 0; + SmallVector<OpPointer<AffineApplyOp>, 4> sliceOps; + mlir::createAffineComputationSlice(dmaStartInst, &sliceOps); + if (!sliceOps.empty()) { + for (auto sliceOp : sliceOps) { + instShiftMap[sliceOp->getInstruction()] = 0; + } } else { // If a slice wasn't created, the reachable affine_apply op's from its // operands are the ones that go with it. |

