summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LoopTiling.cpp
diff options
context:
space:
mode:
authorUday Bondhugula <bondhugula@google.com>2019-02-04 13:48:44 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 16:12:25 -0700
commit0f50414fa4553b1277684cb1dded84b334b35d51 (patch)
tree8efb3362ecfc6ec22121492bd5ab03d9340db447 /mlir/lib/Transforms/LoopTiling.cpp
parent99d6ee02b98b28fb6501e5ae805842a20b94ec4c (diff)
downloadbcm5719-llvm-0f50414fa4553b1277684cb1dded84b334b35d51.tar.gz
bcm5719-llvm-0f50414fa4553b1277684cb1dded84b334b35d51.zip
Refactor common code getting memref access in getMemRefRegion - NFC
- use getAccessMap() instead of repeating it - fold getMemRefRegion into MemRefRegion ctor (more natural, avoid heap allocation and unique_ptr where possible) - change extractForInductionVars - MutableArrayRef -> ArrayRef for the arguments. Since the method is just returning copies of 'Value *', the client can't mutate the pointers themselves; it's fine to mutate the 'Value''s themselves, but that doesn't mutate the pointers to those. - change the way extractForInductionVars returns (see b/123437690) PiperOrigin-RevId: 232359277
Diffstat (limited to 'mlir/lib/Transforms/LoopTiling.cpp')
-rw-r--r--mlir/lib/Transforms/LoopTiling.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp
index 8b368e5f182..758d434d25e 100644
--- a/mlir/lib/Transforms/LoopTiling.cpp
+++ b/mlir/lib/Transforms/LoopTiling.cpp
@@ -201,7 +201,8 @@ UtilResult mlir::tileCodeGen(MutableArrayRef<OpPointer<AffineForOp>> band,
// Move the loop body of the original nest to the new one.
moveLoopBody(origLoops[origLoops.size() - 1], innermostPointLoop);
- SmallVector<Value *, 8> origLoopIVs = extractForInductionVars(band);
+ SmallVector<Value *, 8> origLoopIVs;
+ extractForInductionVars(band, &origLoopIVs);
SmallVector<Optional<Value *>, 6> ids(origLoopIVs.begin(), origLoopIVs.end());
FlatAffineConstraints cst;
getIndexSet(band, &cst);
OpenPOWER on IntegriCloud