summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/PipelineDataTransfer.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-02-06 11:58:03 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 16:17:59 -0700
commit90d10b4e00cc6397a03ddc981b7be8bab43a9f38 (patch)
treed7e05dace26da1d29ba08dbb279701d4c9ae3250 /mlir/lib/Transforms/PipelineDataTransfer.cpp
parent905d84851ddfa9463f872a215a6cb0ad3b7c3894 (diff)
downloadbcm5719-llvm-90d10b4e00cc6397a03ddc981b7be8bab43a9f38.tar.gz
bcm5719-llvm-90d10b4e00cc6397a03ddc981b7be8bab43a9f38.zip
NFC: Rename the 'for' operation in the AffineOps dialect to 'affine.for'. The is the second step to adding a namespace to the AffineOps dialect.
PiperOrigin-RevId: 232717775
Diffstat (limited to 'mlir/lib/Transforms/PipelineDataTransfer.cpp')
-rw-r--r--mlir/lib/Transforms/PipelineDataTransfer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/mlir/lib/Transforms/PipelineDataTransfer.cpp b/mlir/lib/Transforms/PipelineDataTransfer.cpp
index cfa045f2279..84c8cd830dc 100644
--- a/mlir/lib/Transforms/PipelineDataTransfer.cpp
+++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp
@@ -71,11 +71,11 @@ static unsigned getTagMemRefPos(const Instruction &dmaInst) {
return 0;
}
-/// Doubles the buffer of the supplied memref on the specified 'for' instruction
-/// by adding a leading dimension of size two to the memref. Replaces all uses
-/// of the old memref by the new one while indexing the newly added dimension by
-/// the loop IV of the specified 'for' instruction modulo 2. Returns false if
-/// such a replacement cannot be performed.
+/// Doubles the buffer of the supplied memref on the specified 'affine.for'
+/// instruction by adding a leading dimension of size two to the memref.
+/// Replaces all uses of the old memref by the new one while indexing the newly
+/// added dimension by the loop IV of the specified 'affine.for' instruction
+/// modulo 2. Returns false if such a replacement cannot be performed.
static bool doubleBuffer(Value *oldMemRef, OpPointer<AffineForOp> forOp) {
auto *forBody = forOp->getBody();
FuncBuilder bInner(forBody, forBody->begin());
@@ -108,7 +108,7 @@ static bool doubleBuffer(Value *oldMemRef, OpPointer<AffineForOp> forOp) {
dynamicDimCount++));
}
- // Create and place the alloc right before the 'for' instruction.
+ // Create and place the alloc right before the 'affine.for' instruction.
// TODO(mlir-team): we are assuming scoped allocation here, and aren't
// inserting a dealloc -- this isn't the right thing.
Value *newMemRef =
@@ -137,9 +137,9 @@ static bool doubleBuffer(Value *oldMemRef, OpPointer<AffineForOp> forOp) {
/// Returns success if the IR is in a valid state.
PassResult PipelineDataTransfer::runOnFunction(Function *f) {
// Do a post order walk so that inner loop DMAs are processed first. This is
- // necessary since 'for' instructions nested within would otherwise become
- // invalid (erased) when the outer loop is pipelined (the pipelined one gets
- // deleted and replaced by a prologue, a new steady-state loop and an
+ // necessary since 'affine.for' instructions nested within would otherwise
+ // become invalid (erased) when the outer loop is pipelined (the pipelined one
+ // gets deleted and replaced by a prologue, a new steady-state loop and an
// epilogue).
forOps.clear();
f->walkPostOrder<AffineForOp>(
OpenPOWER on IntegriCloud