diff options
Diffstat (limited to 'mlir/lib/Transforms')
| -rw-r--r-- | mlir/lib/Transforms/DmaGeneration.cpp | 6 | ||||
| -rw-r--r-- | mlir/lib/Transforms/LowerAffine.cpp | 32 | ||||
| -rw-r--r-- | mlir/lib/Transforms/MemRefDataFlowOpt.cpp | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/mlir/lib/Transforms/DmaGeneration.cpp b/mlir/lib/Transforms/DmaGeneration.cpp index 631ebf939ea..dcb4828d0bf 100644 --- a/mlir/lib/Transforms/DmaGeneration.cpp +++ b/mlir/lib/Transforms/DmaGeneration.cpp @@ -456,9 +456,9 @@ bool DmaGeneration::runOnBlock(Block *block, uint64_t consumedCapacityBytes) { // 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 'affine.for's in them; treat them - // separately. + // TODO(bondhugula): An 'affine.if' instruction is being treated similar to an + // operation instruction. 'affine.if''s could have 'affine.for's in them; + // treat them separately. // Get to the first load, store, or for op. auto curBegin = diff --git a/mlir/lib/Transforms/LowerAffine.cpp b/mlir/lib/Transforms/LowerAffine.cpp index ef45891c26f..5ce8a6258f4 100644 --- a/mlir/lib/Transforms/LowerAffine.cpp +++ b/mlir/lib/Transforms/LowerAffine.cpp @@ -402,16 +402,16 @@ bool LowerAffinePass::lowerAffineFor(OpPointer<AffineForOp> forOp) { return false; } -// Convert an "if" instruction into a flow of basic blocks. +// Convert an "affine.if" instruction into a flow of basic blocks. // // Create an SESE region for the if instruction (including its "then" and // optional "else" instruction blocks) and append it to the end of the current // region. The conditional region consists of a sequence of condition-checking // blocks that implement the short-circuit scheme, followed by a "then" SESE // region and an "else" SESE region, and the continuation block that -// post-dominates all blocks of the "if" instruction. The flow of blocks that -// correspond to the "then" and "else" clauses are constructed recursively, -// enabling easy nesting of "if" instructions and if-then-else-if chains. +// post-dominates all blocks of the "affine.if" instruction. The flow of blocks +// that correspond to the "then" and "else" clauses are constructed recursively, +// enabling easy nesting of "affine.if" instructions and if-then-else-if chains. // // +--------------------------------+ // | <code before the AffineIfOp> | @@ -465,9 +465,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); @@ -517,15 +517,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 3141d748750..91a17764358 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 'affine.for'/'if' statements is available. +// SSA scalars live out of 'affine.for'/'affine.if' statements is available. //===----------------------------------------------------------------------===// #include "mlir/Analysis/AffineAnalysis.h" |

