Lines Matching refs:loopLike

106 size_t mlir::moveLoopInvariantCode(LoopLikeOpInterface loopLike) {  in moveLoopInvariantCode()  argument
108 loopLike.getLoopRegions(), in moveLoopInvariantCode()
110 return loopLike.isDefinedOutsideOfLoop(value); in moveLoopInvariantCode()
115 [&](Operation *op, Region *) { loopLike.moveOutOfLoop(op); }); in moveLoopInvariantCode()
158 LogicalResult populateSubsetOpsAtIterArg(LoopLikeOpInterface loopLike,
240 MatchingSubsets::populateSubsetOpsAtIterArg(LoopLikeOpInterface loopLike, in populateSubsetOpsAtIterArg() argument
243 assert(iterArg.getOwner()->getParentOp() == loopLike && "invalid iter_arg"); in populateSubsetOpsAtIterArg()
311 if (loopLike.getTiedLoopYieldedValue(iterArg) != yieldedOperand) in populateSubsetOpsAtIterArg()
322 LoopLikeOpInterface loopLike, in hoistSubsetAtIterArg() argument
324 assert(iterArg.getOwner()->getParentOp() == loopLike && "invalid iter_arg"); in hoistSubsetAtIterArg()
325 auto it = llvm::find(loopLike.getRegionIterArgs(), iterArg); in hoistSubsetAtIterArg()
326 int64_t iterArgIdx = std::distance(loopLike.getRegionIterArgs().begin(), it); in hoistSubsetAtIterArg()
328 if (failed(subsets.populateSubsetOpsAtIterArg(loopLike, iterArg))) in hoistSubsetAtIterArg()
329 return loopLike; in hoistSubsetAtIterArg()
339 return loopLike.isDefinedOutsideOfLoop(operand.get()) || in hoistSubsetAtIterArg()
346 return loopLike.isDefinedOutsideOfLoop(operand.get()) || in hoistSubsetAtIterArg()
364 loopLike.replaceWithAdditionalYields( in hoistSubsetAtIterArg()
368 return loopLike; in hoistSubsetAtIterArg()
369 loopLike = *newLoop; in hoistSubsetAtIterArg()
372 iterArg = loopLike.getRegionIterArgs()[iterArgIdx]; in hoistSubsetAtIterArg()
373 OpResult loopResult = loopLike.getTiedLoopResult(iterArg); in hoistSubsetAtIterArg()
374 OpResult newLoopResult = loopLike.getLoopResults()->back(); in hoistSubsetAtIterArg()
375 rewriter.moveOpBefore(extractionOp, loopLike); in hoistSubsetAtIterArg()
376 rewriter.moveOpAfter(insertionOp, loopLike); in hoistSubsetAtIterArg()
380 loopLike.getTiedLoopInit(iterArg)->get()); in hoistSubsetAtIterArg()
388 return loopLike; in hoistSubsetAtIterArg()
393 LoopLikeOpInterface loopLike) { in hoistLoopInvariantSubsets() argument
398 i < static_cast<int64_t>(loopLike.getRegionIterArgs().size()); ++i) { in hoistLoopInvariantSubsets()
399 loopLike = hoistSubsetAtIterArg(rewriter, loopLike, in hoistLoopInvariantSubsets()
400 loopLike.getRegionIterArgs()[i]); in hoistLoopInvariantSubsets()
402 return loopLike; in hoistLoopInvariantSubsets()