• Home
  • Raw
  • Download

Lines Matching refs:ifOp

28 static void promoteIfBlock(AffineIfOp ifOp, bool elseBlock) {  in promoteIfBlock()  argument
30 assert(ifOp.hasElse() && "else block expected"); in promoteIfBlock()
32 Block *destBlock = ifOp->getBlock(); in promoteIfBlock()
33 Block *srcBlock = elseBlock ? ifOp.getElseBlock() : ifOp.getThenBlock(); in promoteIfBlock()
35 Block::iterator(ifOp), srcBlock->getOperations(), srcBlock->begin(), in promoteIfBlock()
37 ifOp.erase(); in promoteIfBlock()
44 static Operation *getOutermostInvariantForOp(AffineIfOp ifOp) { in getOutermostInvariantForOp() argument
46 auto ifOperands = ifOp.getOperands(); in getOutermostInvariantForOp()
47 auto *res = ifOp.getOperation(); in getOutermostInvariantForOp()
70 static AffineIfOp hoistAffineIfOp(AffineIfOp ifOp, Operation *hoistOverOp) { in hoistAffineIfOp() argument
72 if (hoistOverOp == ifOp) in hoistAffineIfOp()
73 return ifOp; in hoistAffineIfOp()
82 auto hoistedIfOp = b.create<AffineIfOp>(ifOp.getLoc(), ifOp.getIntegerSet(), in hoistAffineIfOp()
83 ifOp.getOperands(), in hoistAffineIfOp()
95 ifOp.setAttr(idForIfOp, b.getBoolAttr(true)); in hoistAffineIfOp()
99 promoteIfBlock(ifOp, /*elseBlock=*/false); in hoistAffineIfOp()
180 LogicalResult mlir::hoistAffineIfOp(AffineIfOp ifOp, bool *folded) { in hoistAffineIfOp() argument
183 if (ifOp.getNumResults() != 0) in hoistAffineIfOp()
192 AffineIfOp::getCanonicalizationPatterns(patterns, ifOp.getContext()); in hoistAffineIfOp()
195 applyOpPatternsAndFold(ifOp, frozenPatterns, &erased); in hoistAffineIfOp()
206 assert(llvm::all_of(ifOp.getOperands(), in hoistAffineIfOp()
214 auto *hoistOverOp = getOutermostInvariantForOp(ifOp); in hoistAffineIfOp()
216 AffineIfOp hoistedIfOp = ::hoistAffineIfOp(ifOp, hoistOverOp); in hoistAffineIfOp()
218 if (hoistedIfOp == ifOp) in hoistAffineIfOp()