Lines Matching defs:forOp

584 bool mayHaveZeroIterations(scf::ForOp forOp) {
585 std::optional<int64_t> lb = getConstantIntValue(forOp.getLowerBound());
586 std::optional<int64_t> ub = getConstantIntValue(forOp.getUpperBound());
599 auto forOp = cast<scf::ForOp>(op);
603 if (mayHaveZeroIterations(forOp))
608 return state.isValueRead(forOp.getTiedLoopRegionIterArg(&opOperand));
619 auto forOp = cast<scf::ForOp>(op);
620 OpResult opResult = forOp.getTiedLoopResult(&opOperand);
630 auto forOp = cast<scf::ForOp>(op);
631 BlockArgument bbArg = forOp.getTiedLoopRegionIterArg(opResult);
633 bbArg, forOp.getTiedLoopYieldedValue(bbArg)->get());
664 auto forOp = cast<scf::ForOp>(op);
665 auto yieldOp = cast<scf::YieldOp>(forOp.getBody()->getTerminator());
671 DenseSet<int64_t> indices = getTensorIndices(forOp.getInitArgs());
682 it.value(), &forOp.getRegion(),
683 /*exceptions=*/forOp.getRegionIterArg(it.index()),
703 auto forOp = cast<scf::ForOp>(op);
709 BlockArgument bbArg = forOp.getTiedLoopRegionIterArg(opResult);
715 unsigned resultNum = forOp.getTiedLoopResult(bbArg).getResultNumber();
718 auto yieldOp = cast<scf::YieldOp>(forOp.getBody()->getTerminator());
720 BlockArgument iterArg = forOp.getRegionIterArgs()[resultNum];
721 Value initArg = forOp.getInitArgs()[resultNum];
728 auto forOp = cast<scf::ForOp>(op);
729 Block *oldLoopBody = forOp.getBody();
733 DenseSet<int64_t> indices = getTensorIndices(forOp.getInitArgs());
737 getBuffers(rewriter, forOp.getInitArgsMutable(), options);
746 Value result = forOp->getResult(it.index());
760 forOp.getLoc(), forOp.getLowerBound(), forOp.getUpperBound(),
761 forOp.getStep(), castedInitArgs);
762 newForOp->setAttrs(forOp->getAttrs());
770 forOp.getRegionIterArgs(), indices);
796 auto forOp = cast<scf::ForOp>(op);
797 auto yieldOp = cast<scf::YieldOp>(forOp.getBody()->getTerminator());