diff options
Diffstat (limited to 'mlir/lib/Transforms')
| -rw-r--r-- | mlir/lib/Transforms/DmaGeneration.cpp | 4 | ||||
| -rw-r--r-- | mlir/lib/Transforms/LowerAffine.cpp | 24 | ||||
| -rw-r--r-- | mlir/lib/Transforms/MemRefDataFlowOpt.cpp | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/mlir/lib/Transforms/DmaGeneration.cpp b/mlir/lib/Transforms/DmaGeneration.cpp index 1616cd3472d..3310a171b58 100644 --- a/mlir/lib/Transforms/DmaGeneration.cpp +++ b/mlir/lib/Transforms/DmaGeneration.cpp @@ -471,8 +471,8 @@ bool DmaGeneration::runOnBlock(Block *block) { // instructions) are always assumed to not exhaust memory. As a result, this // approach is conservative in some cases at the moment, we do a check later // and report an error with location info. - // TODO(bondhugula): An 'if' instruction is being treated similar to an - // operation instruction. 'if''s could have 'for's in them; + // TODO(bondhugula): An 'affine.if' instruction is being treated similar to an + // operation instruction. 'affine.if''s could have 'for's in them; // treat them separately. // Get to the first load, store, or for op. diff --git a/mlir/lib/Transforms/LowerAffine.cpp b/mlir/lib/Transforms/LowerAffine.cpp index f80b4426b6d..3061bcd254d 100644 --- a/mlir/lib/Transforms/LowerAffine.cpp +++ b/mlir/lib/Transforms/LowerAffine.cpp @@ -456,9 +456,9 @@ bool LowerAffinePass::lowerAffineIf(AffineIfOp ifOp) { auto *ifInst = ifOp->getInstruction(); auto loc = ifInst->getLoc(); - // Start by splitting the block containing the 'if' into two parts. The part - // before will contain the condition, the part after will be the continuation - // point. + // Start by splitting the block containing the 'affine.if' into two parts. The + // part before will contain the condition, the part after will be the + // continuation point. auto *condBlock = ifInst->getBlock(); auto *continueBlock = condBlock->splitBlock(ifInst); @@ -508,15 +508,15 @@ bool LowerAffinePass::lowerAffineIf(AffineIfOp ifOp) { // Ok, now we just have to handle the condition logic. auto integerSet = ifOp->getIntegerSet(); - // Implement short-circuit logic. For each affine expression in the 'if' - // condition, convert it into an affine map and call `affine.apply` to obtain - // the resulting value. Perform the equality or the greater-than-or-equality - // test between this value and zero depending on the equality flag of the - // condition. If the test fails, jump immediately to the false branch, which - // may be the else block if it is present or the continuation block otherwise. - // If the test succeeds, jump to the next block testing the next conjunct of - // the condition in the similar way. When all conjuncts have been handled, - // jump to the 'then' block instead. + // Implement short-circuit logic. For each affine expression in the + // 'affine.if' condition, convert it into an affine map and call + // `affine.apply` to obtain the resulting value. Perform the equality or the + // greater-than-or-equality test between this value and zero depending on the + // equality flag of the condition. If the test fails, jump immediately to the + // false branch, which may be the else block if it is present or the + // continuation block otherwise. If the test succeeds, jump to the next block + // testing the next conjunct of the condition in the similar way. When all + // conjuncts have been handled, jump to the 'then' block instead. builder.setInsertionPointToEnd(condBlock); Value *zeroConstant = builder.create<ConstantIndexOp>(loc, 0); diff --git a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp index 4088cde4185..a35a159443d 100644 --- a/mlir/lib/Transforms/MemRefDataFlowOpt.cpp +++ b/mlir/lib/Transforms/MemRefDataFlowOpt.cpp @@ -19,7 +19,7 @@ // potentially getting rid of intermediate memref's entirely. // TODO(mlir-team): In the future, similar techniques could be used to eliminate // dead memref store's and perform more complex forwarding when support for -// SSA scalars live out of 'for'/'if' statements is available. +// SSA scalars live out of 'for'/'affine.if' statements is available. //===----------------------------------------------------------------------===// #include "mlir/Analysis/AffineAnalysis.h" |

